From e2d223c714108af0f8568ae6e6248df4440e7649 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Thu, 29 Jan 2026 12:30:30 -0500 Subject: [PATCH] fix: improve layout and styling for empty state and shift header in CoverageShiftList --- .../widgets/coverage_shift_list.dart | 71 ++++++++++--------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/apps/mobile/packages/features/client/client_coverage/lib/src/presentation/widgets/coverage_shift_list.dart b/apps/mobile/packages/features/client/client_coverage/lib/src/presentation/widgets/coverage_shift_list.dart index 0732c389..7ec0c0c5 100644 --- a/apps/mobile/packages/features/client/client_coverage/lib/src/presentation/widgets/coverage_shift_list.dart +++ b/apps/mobile/packages/features/client/client_coverage/lib/src/presentation/widgets/coverage_shift_list.dart @@ -35,24 +35,23 @@ class CoverageShiftList extends StatelessWidget { if (shifts.isEmpty) { return Container( padding: const EdgeInsets.all(UiConstants.space8), + width: double.infinity, decoration: BoxDecoration( color: UiColors.bgPopup, borderRadius: UiConstants.radiusLg, border: Border.all(color: UiColors.border), ), child: Column( + spacing: UiConstants.space4, children: [ const Icon( UiIcons.users, size: UiConstants.space12, - color: UiColors.mutedForeground, + color: UiColors.textSecondary, ), - const SizedBox(height: UiConstants.space3), Text( 'No shifts scheduled for this day', - style: UiTypography.body2r.copyWith( - color: UiColors.mutedForeground, - ), + style: UiTypography.body2r.textSecondary, ), ], ), @@ -160,12 +159,15 @@ class _ShiftHeader extends StatelessWidget { ), ), child: Row( + spacing: UiConstants.space4, children: [ Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, + spacing: UiConstants.space2, children: [ Row( + spacing: UiConstants.space2, children: [ Container( width: UiConstants.space2, @@ -175,42 +177,43 @@ class _ShiftHeader extends StatelessWidget { shape: BoxShape.circle, ), ), - const SizedBox(width: UiConstants.space2), Text( title, - style: UiTypography.body1b.copyWith( - color: UiColors.textPrimary, - ), + style: UiTypography.body1b.textPrimary, ), ], ), - const SizedBox(height: UiConstants.space2), - Row( + Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ - const Icon( - UiIcons.mapPin, - size: UiConstants.space3, - color: UiColors.mutedForeground, + Row( + spacing: UiConstants.space1, + children: [ + const Icon( + UiIcons.mapPin, + size: UiConstants.space3, + color: UiColors.iconSecondary, + ), + Expanded(child: Text( + location, + style: UiTypography.body3r.textSecondary, + overflow: TextOverflow.ellipsis, + )), + ], ), - const SizedBox(width: UiConstants.space1), - Text( - location, - style: UiTypography.body3r.copyWith( - color: UiColors.mutedForeground, - ), - ), - const SizedBox(width: UiConstants.space3), - const Icon( - UiIcons.clock, - size: UiConstants.space3, - color: UiColors.mutedForeground, - ), - const SizedBox(width: UiConstants.space1), - Text( - startTime, - style: UiTypography.body3r.copyWith( - color: UiColors.mutedForeground, - ), + Row( + spacing: UiConstants.space1, + children: [ + const Icon( + UiIcons.clock, + size: UiConstants.space3, + color: UiColors.iconSecondary, + ), + Text( + startTime, + style: UiTypography.body3r.textSecondary, + ), + ], ), ], ),