From 3bd6eb83aca35520bc202c6e65db408b9345c4ad Mon Sep 17 00:00:00 2001 From: Suherdy Yacob Date: Sun, 14 Jun 2026 16:31:03 +0700 Subject: [PATCH] feat: display POS name in order cards on the orders screen --- lib/screens/orders_screen.dart | 36 +++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/lib/screens/orders_screen.dart b/lib/screens/orders_screen.dart index cac5f66..bb4b5f3 100644 --- a/lib/screens/orders_screen.dart +++ b/lib/screens/orders_screen.dart @@ -119,6 +119,7 @@ class _OrdersScreenState extends State { final isEarn = item['type'] == 'earn'; final orderRef = item['order_ref'] as String? ?? ''; final rawDate = item['date'] as String? ?? ''; + final posName = item['pos_name'] as String? ?? ''; return Card( margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 6), @@ -146,11 +147,36 @@ class _OrdersScreenState extends State { ), subtitle: Padding( padding: const EdgeInsets.only(top: 6.0), - child: Text( - _formatDate(rawDate), - style: theme.textTheme.bodySmall?.copyWith( - color: AppTheme.onSurfaceVariant, - ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (posName.isNotEmpty) ...[ + Row( + children: [ + Icon( + Icons.storefront_rounded, + size: 14, + color: theme.colorScheme.primary, + ), + const SizedBox(width: 4), + Text( + posName, + style: theme.textTheme.bodySmall?.copyWith( + fontWeight: FontWeight.w600, + color: theme.colorScheme.primary, + ), + ), + ], + ), + const SizedBox(height: 4), + ], + Text( + _formatDate(rawDate), + style: theme.textTheme.bodySmall?.copyWith( + color: AppTheme.onSurfaceVariant, + ), + ), + ], ), ), trailing: Text(