style(shift_header): improve layout and styling of shift header components
This commit is contained in:
@@ -86,7 +86,7 @@ class ShiftHeader extends StatelessWidget {
|
||||
children: <Widget>[
|
||||
// Row 1: status dot, title + time, badge, chevron.
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
// Status dot.
|
||||
Padding(
|
||||
@@ -100,7 +100,7 @@ class ShiftHeader extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: UiConstants.space3),
|
||||
const SizedBox(width: UiConstants.space4),
|
||||
// Title and start time.
|
||||
Expanded(
|
||||
child: Column(
|
||||
@@ -157,21 +157,29 @@ class ShiftHeader extends StatelessWidget {
|
||||
const SizedBox(height: UiConstants.space3),
|
||||
// Progress bar.
|
||||
ClipRRect(
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
child: Container(
|
||||
height: 6,
|
||||
decoration: const BoxDecoration(
|
||||
color: UiColors.muted,
|
||||
),
|
||||
child: FractionallySizedBox(
|
||||
alignment: Alignment.centerLeft,
|
||||
widthFactor: fillFraction,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: statusColor,
|
||||
borderRadius: UiConstants.radiusSm,
|
||||
borderRadius: UiConstants.radiusFull,
|
||||
child: SizedBox(
|
||||
height: 8,
|
||||
width: double.infinity,
|
||||
child: Stack(
|
||||
children: <Widget>[
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: UiColors.muted,
|
||||
borderRadius: UiConstants.radiusFull,
|
||||
),
|
||||
),
|
||||
),
|
||||
FractionallySizedBox(
|
||||
alignment: Alignment.centerLeft,
|
||||
widthFactor: fillFraction,
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: statusColor,
|
||||
borderRadius: UiConstants.radiusFull,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -181,9 +189,7 @@ class ShiftHeader extends StatelessWidget {
|
||||
'$onSiteCount ${stats.on_site} · '
|
||||
'$enRouteCount ${stats.en_route} · '
|
||||
'$lateCount ${stats.late}',
|
||||
style: UiTypography.body3r.copyWith(
|
||||
color: UiColors.textSecondary,
|
||||
),
|
||||
style: UiTypography.body3r.textSecondary,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user