From 095b35c996894df369d727c1888edf7505fabb84 Mon Sep 17 00:00:00 2001 From: Trina Bakshi Date: Tue, 13 May 2025 12:34:22 +0530 Subject: [PATCH] Modified Dashboard Screen --- .../dashboard/screens/dashboard_screen.dart | 49 ++++++++++++------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/lib/features/dashboard/screens/dashboard_screen.dart b/lib/features/dashboard/screens/dashboard_screen.dart index 510bf5f..654e521 100644 --- a/lib/features/dashboard/screens/dashboard_screen.dart +++ b/lib/features/dashboard/screens/dashboard_screen.dart @@ -38,8 +38,8 @@ class _DashboardScreenState extends State { child: InkWell( borderRadius: BorderRadius.circular(20), onTap: (){ - Navigator.push(context, MaterialPageRoute( - builder: (context) => const CustomerInfoScreen())); + // Navigator.push(context, MaterialPageRoute( + // builder: (context) => const CustomerInfoScreen())); }, child: const CircleAvatar( backgroundImage: AssetImage('assets/images/avatar.jpg'), // Replace with your image @@ -103,14 +103,24 @@ class _DashboardScreenState extends State { shrinkWrap: true, physics: const NeverScrollableScrollPhysics(), children: [ - _buildQuickLink(Symbols.id_card, "Customer \n Info"), - _buildQuickLink(Symbols.currency_rupee, "Quick \n Pay"), - _buildQuickLink(Symbols.send_money, "Fund \n Transfer"), - _buildQuickLink(Symbols.server_person, "Account \n Info"), - _buildQuickLink(Symbols.receipt_long, "Account \n History"), - _buildQuickLink(Symbols.checkbook, "Handle \n Cheque"), - _buildQuickLink(Icons.group, "Manage \n Beneficiary"), - _buildQuickLink(Symbols.support_agent, "Contact \n Us"), + _buildQuickLink(Symbols.id_card, "Customer \n Info", () { + Navigator.push(context, MaterialPageRoute( + builder: (context) => const CustomerInfoScreen()));; + }), + _buildQuickLink(Symbols.currency_rupee, "Quick \n Pay", + () => print("")), + _buildQuickLink(Symbols.send_money, "Fund \n Transfer", + () => print("")), + _buildQuickLink(Symbols.server_person, "Account \n Info", + () => print("")), + _buildQuickLink(Symbols.receipt_long, "Account \n History", + () => print("")), + _buildQuickLink(Symbols.checkbook, "Handle \n Cheque", + () => print("")), + _buildQuickLink(Icons.group, "Manage \n Beneficiary", + () => print("")), + _buildQuickLink(Symbols.support_agent, "Contact \n Us", + () => print("")), ], ), const SizedBox(height: 10), @@ -135,14 +145,17 @@ class _DashboardScreenState extends State { ); } - Widget _buildQuickLink(IconData icon, String label) { - return Column( - mainAxisSize: MainAxisSize.min, - children: [ - Icon(icon, size: 30, color: Colors.blue[700]), - const SizedBox(height: 4), - Text(label, textAlign: TextAlign.center, style: const TextStyle(fontSize: 12)), - ], + Widget _buildQuickLink(IconData icon, String label, VoidCallback onTap) { + return InkWell( + onTap: onTap, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Icon(icon, size: 30, color: Colors.blue[700]), + const SizedBox(height: 4), + Text(label, textAlign: TextAlign.center, style: const TextStyle(fontSize: 12)), + ], + ), ); } } \ No newline at end of file