Download notification created and Profile added in quick links
This commit is contained in:
@@ -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,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user