Mobile Number Implemented in OTP

This commit is contained in:
2025-09-11 18:13:39 +05:30
parent 0f205873a9
commit 82e057d804
7 changed files with 49 additions and 23 deletions

View File

@@ -226,12 +226,21 @@ class _DashboardScreenState extends State<DashboardScreen> {
child: InkWell(
borderRadius: BorderRadius.circular(20),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const ProfileScreen(),
),
);
final authState = context.read<AuthCubit>().state;
String mobileNumberToPass = '';
if (authState is Authenticated) {
if (selectedAccountIndex >= 0 && selectedAccountIndex < authState.users.length) {
mobileNumberToPass = authState.users[selectedAccountIndex].mobileNo ?? '';
}
}
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => ProfileScreen(mobileNumber: mobileNumberToPass),
),
);
},
child: CircleAvatar(
backgroundColor: Colors.grey[200],