From 42945b3b60d5c6370ab0a0a413b766b3881fab9d Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Tue, 17 Mar 2026 15:15:18 -0400 Subject: [PATCH] feat: update ReorderWidget layout for responsive design; adjust item dimensions based on screen size --- .../presentation/widgets/reorder_widget.dart | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/apps/mobile/packages/features/client/home/lib/src/presentation/widgets/reorder_widget.dart b/apps/mobile/packages/features/client/home/lib/src/presentation/widgets/reorder_widget.dart index 4a8f8e1f..c3cf54d2 100644 --- a/apps/mobile/packages/features/client/home/lib/src/presentation/widgets/reorder_widget.dart +++ b/apps/mobile/packages/features/client/home/lib/src/presentation/widgets/reorder_widget.dart @@ -35,12 +35,13 @@ class ReorderWidget extends StatelessWidget { } final TranslationsClientHomeReorderEn i18n = t.client_home.reorder; + final Size size = MediaQuery.sizeOf(context); return SectionLayout( title: title, subtitle: subtitle, child: SizedBox( - height: 140, + height: size.height * 0.18, child: ListView.separated( scrollDirection: Axis.horizontal, itemCount: orders.length, @@ -50,7 +51,7 @@ class ReorderWidget extends StatelessWidget { final RecentOrder order = orders[index]; return Container( - width: 260, + width: size.width * 0.8, padding: const EdgeInsets.all(UiConstants.space3), decoration: BoxDecoration( color: UiColors.white, @@ -86,7 +87,7 @@ class ReorderWidget extends StatelessWidget { children: [ Text( order.title, - style: UiTypography.body2b, + style: UiTypography.body2m, overflow: TextOverflow.ellipsis, ), if (order.hubName != null && @@ -103,18 +104,18 @@ class ReorderWidget extends StatelessWidget { ], ), ), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - // ASSUMPTION: No i18n key for 'positions' under - // reorder section — carrying forward existing - // hardcoded string pattern for this migration. - Text( - '${order.positionCount} positions', - style: UiTypography.footnote2r.textSecondary, - ), - ], - ), + // Column( + // crossAxisAlignment: CrossAxisAlignment.end, + // children: [ + // // ASSUMPTION: No i18n key for 'positions' under + // // reorder section — carrying forward existing + // // hardcoded string pattern for this migration. + // Text( + // '${order.positionCount} positions', + // style: UiTypography.footnote2r.textSecondary, + // ), + // ], + // ), ], ), const SizedBox(height: UiConstants.space3),