From 8aa5b170ca9a2c744a7fbd29c754e040d017a732 Mon Sep 17 00:00:00 2001 From: asif Date: Fri, 28 Nov 2025 12:22:51 +0530 Subject: [PATCH] Account Statement UI Changed --- .../screens/account_statement_screen.dart | 187 ++++++++++-------- .../dashboard/screens/dashboard_screen.dart | 2 +- 2 files changed, 104 insertions(+), 85 deletions(-) diff --git a/lib/features/accounts/screens/account_statement_screen.dart b/lib/features/accounts/screens/account_statement_screen.dart index 84674f3..d9e9a83 100644 --- a/lib/features/accounts/screens/account_statement_screen.dart +++ b/lib/features/accounts/screens/account_statement_screen.dart @@ -146,42 +146,59 @@ class _AccountStatementScreen extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - AppLocalizations.of(context).accountNumber, - style: const TextStyle( - fontWeight: FontWeight.w500, fontSize: 14), + Card( + margin: const EdgeInsets.only(bottom: 10), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Text( + AppLocalizations.of(context).accountNumber, + style: const TextStyle( + fontWeight: FontWeight.w500, fontSize: 17), + ), + const VerticalDivider(width: 20, thickness: 1, indent: 5, endIndent: 5, color: Colors.grey), + DropdownButton( + value: selectedUser, + onChanged: (User? newUser) { + if (newUser != null) { + setState(() { + selectedUser = newUser; + }); + _loadTransactions(); + } + }, + items: widget.users.map((user) { + return DropdownMenuItem( + value: user, + child: Text(user.accountNo.toString()), + ); + }).toList(), + underline: Container(), // Remove the underline + ), + Spacer(), + ], + ), ), ), - DropdownButton( - value: selectedUser, - onChanged: (User? newUser) { - if (newUser != null) { - setState(() { - selectedUser = newUser; - }); - _loadTransactions(); - } - }, - items: widget.users.map((user) { - return DropdownMenuItem( - value: user, - child: Text(user.accountNo.toString()), - ); - }).toList(), - ), - const SizedBox(height: 15), - Row( - children: [ - Text( - "${AppLocalizations.of(context).availableBalance}: ", - style: const TextStyle( - fontSize: 17, - ), + Card( + margin: const EdgeInsets.only(bottom: 10), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Row( + children: [ + Text( + "${AppLocalizations.of(context).availableBalance}: ", + style: const TextStyle( + fontSize: 17, + ), + ), + Text(' ₹ ${selectedUser.availableBalance}', + style: const TextStyle(fontSize: 17)), + ], ), - Text(' ₹ ${selectedUser.availableBalance}', - style: const TextStyle(fontSize: 17)), - ], + ), ), - const SizedBox(height: 15), Text( AppLocalizations.of(context).filters, style: const TextStyle(fontSize: 17), @@ -300,63 +317,65 @@ class _AccountStatementScreen extends State { Theme.of(context).colorScheme.onSurface, )), ) - : ListView.separated( + : ListView.builder( itemCount: _transactions.length, itemBuilder: (context, index) { final tx = _transactions[index]; - return ListTile( - leading: Icon( - tx.type == 'CR' - ? Symbols.call_received - : Symbols.call_made, - color: tx.type == 'CR' - ? const Color(0xFF10BB10) - : Theme.of(context).colorScheme.error, + return Card( + margin: const EdgeInsets.symmetric( + horizontal: 0, vertical: 4), + child: ListTile( + leading: Icon( + tx.type == 'CR' + ? Symbols.call_received + : Symbols.call_made, + color: tx.type == 'CR' + ? const Color(0xFF10BB10) + : Theme.of(context).colorScheme.error, + ), + title: Text( + tx.date ?? '', + style: const TextStyle(fontSize: 15), + ), + subtitle: Text( + tx.name != null + ? (tx.name!.length > 22 + ? tx.name!.substring(0, 22) + : tx.name!) + : '', + style: const TextStyle(fontSize: 12), + ), + trailing: Column( + crossAxisAlignment: + CrossAxisAlignment.end, + mainAxisAlignment: + MainAxisAlignment.center, + children: [ + Text( + "₹${tx.amount}", + style: const TextStyle(fontSize: 17), + ), + Text( + "Bal: ₹${tx.balance}", + style: const TextStyle( + fontSize: + 12), // Style matches tx.name + ), + ], + ), + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (_) => + TransactionDetailsScreen( + transaction: tx), + ), + ); + }, ), - title: Text( - tx.date ?? '', - style: const TextStyle(fontSize: 15), - ), - subtitle: Text( - tx.name != null - ? (tx.name!.length > 22 - ? tx.name!.substring(0, 22) - : tx.name!) - : '', - style: const TextStyle(fontSize: 12), - ), - trailing: Column( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - "₹${tx.amount}", - style: const TextStyle(fontSize: 17), - ), - Text( - "Bal: ₹${tx.balance}", - style: const TextStyle( - fontSize: - 12), // Style matches tx.name - ), - ], - ), - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => - TransactionDetailsScreen( - transaction: tx), - ), - ); - }, ); }, - separatorBuilder: (context, index) { - return Divider( - color: Theme.of(context).dividerColor); - }, ), ), ], diff --git a/lib/features/dashboard/screens/dashboard_screen.dart b/lib/features/dashboard/screens/dashboard_screen.dart index 6077bb7..95d1990 100644 --- a/lib/features/dashboard/screens/dashboard_screen.dart +++ b/lib/features/dashboard/screens/dashboard_screen.dart @@ -666,7 +666,7 @@ class _DashboardScreenState extends State const EnquiryScreen())); }), _buildQuickLink( - Symbols.request_quote, + Symbols.checkbook, AppLocalizations.of(context).chequeManagement, () { Navigator.push(