dashboard Screen UI changed

This commit is contained in:
2025-11-24 12:20:35 +05:30
parent c1df43e9b6
commit 71b52cfb43

View File

@@ -10,6 +10,7 @@ import 'package:kmobile/features/accounts/screens/transaction_details_screen.dar
import 'package:kmobile/features/auth/controllers/auth_cubit.dart'; import 'package:kmobile/features/auth/controllers/auth_cubit.dart';
import 'package:kmobile/features/auth/controllers/auth_state.dart'; import 'package:kmobile/features/auth/controllers/auth_state.dart';
import 'package:kmobile/features/customer_info/screens/customer_info_screen.dart'; import 'package:kmobile/features/customer_info/screens/customer_info_screen.dart';
import 'package:kmobile/features/cheque/screens/cheque_management_screen.dart';
import 'package:kmobile/features/beneficiaries/screens/manage_beneficiaries_screen.dart'; import 'package:kmobile/features/beneficiaries/screens/manage_beneficiaries_screen.dart';
import 'package:kmobile/features/enquiry/screens/enquiry_screen.dart'; import 'package:kmobile/features/enquiry/screens/enquiry_screen.dart';
import 'package:kmobile/features/fund_transfer/screens/fund_transfer_screen.dart'; import 'package:kmobile/features/fund_transfer/screens/fund_transfer_screen.dart';
@@ -288,7 +289,6 @@ class _DashboardScreenState extends State<DashboardScreen>
final firstName = getProcessedFirstName(currAccount.name); final firstName = getProcessedFirstName(currAccount.name);
return SingleChildScrollView( return SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column( child: Column(
@@ -470,16 +470,16 @@ class _DashboardScreenState extends State<DashboardScreen>
AppLocalizations.of(context).quickLinks, AppLocalizations.of(context).quickLinks,
style: const TextStyle(fontSize: 17), style: const TextStyle(fontSize: 17),
), ),
const SizedBox(height: 16), const SizedBox(height: 24),
// Quick Links // Quick Links
GridView.count( GridView.count(
crossAxisCount: 2, // Changed to 2 for two cards in a row crossAxisCount: 3,
shrinkWrap: true, shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(), physics: const NeverScrollableScrollPhysics(),
crossAxisSpacing: 10, crossAxisSpacing: 10,
mainAxisSpacing: 10, mainAxisSpacing: 10,
childAspectRatio: 1.2, // Adjusted for better fit with 2 cards childAspectRatio: 1,
children: [ children: [
_buildQuickLink( _buildQuickLink(
Symbols.id_card, Symbols.id_card,
@@ -582,9 +582,22 @@ class _DashboardScreenState extends State<DashboardScreen>
builder: (context) => builder: (context) =>
const EnquiryScreen())); const EnquiryScreen()));
}), }),
_buildQuickLink(
Symbols.request_quote,
AppLocalizations.of(context).chequeManagement,
() {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const ChequeManagementScreen(),
),
);
},
),
], ],
), ),
const SizedBox(height: 5),
], ],
), ),
), ),
@@ -633,7 +646,7 @@ class _DashboardScreenState extends State<DashboardScreen>
}) { }) {
final theme = Theme.of(context); final theme = Theme.of(context);
return Card( return Card(
elevation: 4, elevation: 2,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12.0), borderRadius: BorderRadius.circular(12.0),
), ),
@@ -645,17 +658,18 @@ class _DashboardScreenState extends State<DashboardScreen>
children: [ children: [
Icon( Icon(
icon, icon,
size: 40, size: 30,
color: disable color: disable
? theme.disabledColor ? theme.disabledColor
: theme.colorScheme.primary, : theme.colorScheme.primary,
), ),
const SizedBox(height: 8), const SizedBox(height: 4),
Text( Text(
label, label,
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: theme.textTheme.titleMedium?.copyWith( style: theme.textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12,
color: disable color: disable
? theme.disabledColor ? theme.disabledColor
: theme.colorScheme.onSurface, : theme.colorScheme.onSurface,