Download notification created and Profile added in quick links

This commit is contained in:
2025-12-02 17:06:49 +05:30
parent 992092052a
commit 5d307607fd
8 changed files with 211 additions and 67 deletions

View File

@@ -388,6 +388,21 @@ class _DashboardScreenState extends State<DashboardScreen>
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final authState = context.read<AuthCubit>().state;
String mobileNumberToPass = '';
String customerNo = '';
String customerName = '';
if (authState is Authenticated) {
if (selectedAccountIndex >= 0 &&
selectedAccountIndex < authState.users.length) {
mobileNumberToPass =
authState.users[selectedAccountIndex].mobileNo ?? '';
customerNo =
authState.users[selectedAccountIndex].cifNumber ?? '';
customerName =
authState.users[selectedAccountIndex].name ?? '';
}
}
return BlocListener<AuthCubit, AuthState>(
listener: (context, state) async {
if (state is Authenticated && !_biometricPromptShown) {
@@ -429,21 +444,7 @@ class _DashboardScreenState extends State<DashboardScreen>
child: InkWell(
borderRadius: BorderRadius.circular(20),
onTap: () {
final authState = context.read<AuthCubit>().state;
String mobileNumberToPass = '';
String customerNo = '';
String customerName = '';
if (authState is Authenticated) {
if (selectedAccountIndex >= 0 &&
selectedAccountIndex < authState.users.length) {
mobileNumberToPass =
authState.users[selectedAccountIndex].mobileNo ?? '';
customerNo =
authState.users[selectedAccountIndex].cifNumber ?? '';
customerName =
authState.users[selectedAccountIndex].name ?? '';
}
}
Navigator.push(
context,
@@ -677,18 +678,21 @@ class _DashboardScreenState extends State<DashboardScreen>
const EnquiryScreen()));
}),
_buildQuickLink(
Symbols.checkbook,
AppLocalizations.of(context).chequeManagement,
Symbols.person,
AppLocalizations.of(context).profile,
() {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const ChequeManagementScreen(),
),
ProfileScreen(
mobileNumber: mobileNumberToPass,
customerNo: customerNo,
customerName: customerName),
),
);
},
disable: true,
disable: false,
),
],
),