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