Customerf Info page changed and landing page changed

This commit is contained in:
2025-12-02 13:31:40 +05:30
parent 64fedabd89
commit 992092052a
6 changed files with 156 additions and 89 deletions

View File

@@ -403,58 +403,68 @@ class _DashboardScreenState extends State<DashboardScreen>
backgroundColor: theme.scaffoldBackgroundColor,
appBar: AppBar(
backgroundColor: theme.scaffoldBackgroundColor,
leading: Padding(
padding: const EdgeInsets.only(left: 10.0),
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,
MaterialPageRoute(
builder: (context) => ProfileScreen(
mobileNumber: mobileNumberToPass,
customerNo: customerNo,
customerName: customerName),
),
);
},
child: CircleAvatar(
backgroundColor: Colors.grey[200],
radius: 20,
child: SvgPicture.asset(
'assets/images/avatar_male.svg',
width: 40,
height: 40,
fit: BoxFit.cover,
),
),
leading: const Padding(
padding: EdgeInsets.only(left: 10.0),
child: CircleAvatar(
radius: 15,
backgroundImage: AssetImage('assets/images/logo.png'),
),
),
title: Text(
AppLocalizations.of(context).kccbMobile,
textAlign: TextAlign.left,
AppLocalizations.of(context).kccBankFull.replaceAll('-', '\u2011'),
textAlign: TextAlign.center,
softWrap: true, // Explicitly allow wrapping
maxLines: 2, // Allow text to wrap to a maximum of 2 lines
style: TextStyle(
color: theme.colorScheme.primary,
fontWeight: FontWeight.w700,
fontSize: 20,
),
),
centerTitle: true,
// Removed centerTitle: true to give more space for text wrapping
actions: [
Padding(
padding: const EdgeInsets.only(right: 10.0),
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,
MaterialPageRoute(
builder: (context) => ProfileScreen(
mobileNumber: mobileNumberToPass,
customerNo: customerNo,
customerName: customerName),
),
);
},
child: CircleAvatar(
backgroundColor: Colors.grey[200],
radius: 21,
child: SvgPicture.asset(
'assets/images/avatar_male.svg',
),
),
),
),
],
),
body: BlocBuilder<AuthCubit, AuthState>(
builder: (context, state) {
@@ -486,6 +496,7 @@ class _DashboardScreenState extends State<DashboardScreen>
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const SizedBox(height: 16), // Added spacing
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Text(