Profile Changed and Customer Info
This commit is contained in:
BIN
assets/images/profile.svg
Normal file
BIN
assets/images/profile.svg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
@@ -74,9 +74,9 @@ Dio _createDioClient() {
|
||||
final dio = Dio(
|
||||
BaseOptions(
|
||||
baseUrl:
|
||||
'http://lb-test-mobile-banking-app-192209417.ap-south-1.elb.amazonaws.com:8080', //test
|
||||
//'http://lb-test-mobile-banking-app-192209417.ap-south-1.elb.amazonaws.com:8080', //test
|
||||
//'http://lb-kccb-mobile-banking-app-848675342.ap-south-1.elb.amazonaws.com', //prod
|
||||
//'https://kccbmbnk.net', //prod small
|
||||
'https://kccbmbnk.net', //prod small
|
||||
connectTimeout: const Duration(seconds: 60),
|
||||
receiveTimeout: const Duration(seconds: 60),
|
||||
headers: {
|
||||
|
||||
@@ -33,44 +33,89 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||
.replaceFirst(RegExp('\n'), ''),
|
||||
),
|
||||
),
|
||||
body: Stack(
|
||||
body: SafeArea(
|
||||
child: Stack(
|
||||
children: [
|
||||
SingleChildScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: SafeArea(
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 30),
|
||||
CircleAvatar(
|
||||
Card(
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
side: BorderSide(
|
||||
color: theme.colorScheme.outline.withOpacity(0.2),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: Padding( padding: const EdgeInsets.all(16.0),
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 56,
|
||||
height: 56,
|
||||
child: CircleAvatar(
|
||||
radius: 50,
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/avatar_male.svg',
|
||||
width: 150,
|
||||
height: 150,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 10.0),
|
||||
child: Text(
|
||||
user.name ?? '',
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: theme.colorScheme.onSurface,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
// Name + mobile
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'${AppLocalizations.of(context).cif}: ${user.cifNumber ?? 'N/A'}',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: theme.colorScheme.onSurfaceVariant),
|
||||
// If you want to show the user's name instead, replace below.
|
||||
user.name ?? '',
|
||||
style:
|
||||
theme.textTheme.titleLarge?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
user.cifNumber ?? '',
|
||||
style: theme.textTheme.bodyMedium?.copyWith(
|
||||
color: theme.colorScheme.onSurface
|
||||
.withOpacity(0.7),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Card(
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
side: BorderSide(
|
||||
color: theme.colorScheme.outline.withOpacity(0.2),
|
||||
width: 1,
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Personal Information',
|
||||
style: theme.textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
InfoField(
|
||||
label: AppLocalizations.of(context).activeAccounts,
|
||||
value: user.activeAccounts?.toString() ?? 'N/A',
|
||||
@@ -97,11 +142,13 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||
InfoField(
|
||||
label: AppLocalizations.of(context).primaryId,
|
||||
value: _maskPrimaryId(user.primaryId),
|
||||
), // Replace with PAN if available
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
IgnorePointer(
|
||||
@@ -120,6 +167,7 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -141,16 +189,16 @@ class InfoField extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: theme.colorScheme.onSurfaceVariant,
|
||||
style: theme.textTheme.bodySmall?.copyWith(
|
||||
color: theme.colorScheme.onSurface.withOpacity(0.6),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 3),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
value,
|
||||
style: TextStyle(fontSize: 16, color: theme.colorScheme.onSurface),
|
||||
value.isEmpty ? 'N/A' : value,
|
||||
style: theme.textTheme.titleMedium?.copyWith(
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -23,17 +23,16 @@ class PreferenceScreen extends StatelessWidget {
|
||||
return Stack(
|
||||
children: [
|
||||
ListView(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
children: [
|
||||
//Set Prefered Username
|
||||
// ListTile(
|
||||
// leading: const Icon(Icons.person),
|
||||
// title: const Text("Set Prefered Username"),
|
||||
// onTap: () {
|
||||
// }),
|
||||
// Language Selection
|
||||
ListTile(
|
||||
Card(
|
||||
margin: const EdgeInsets.only(bottom: 10),
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.language),
|
||||
title: Text(loc.language),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
@@ -41,24 +40,33 @@ class PreferenceScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
//Theme Mode Switch (Light/Dark)
|
||||
ListTile(
|
||||
Card(
|
||||
margin: const EdgeInsets.only(bottom: 10),
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.brightness_6),
|
||||
title: Text(AppLocalizations.of(context).themeMode),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
onTap: () {
|
||||
showThemeModeDialog(context);
|
||||
},
|
||||
),
|
||||
),
|
||||
//Color_Theme_Selection
|
||||
ListTile(
|
||||
Card(
|
||||
margin: const EdgeInsets.only(bottom: 10),
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.color_lens),
|
||||
title: Text(AppLocalizations.of(context).themeColor),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
onTap: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (_) => const ColorThemeDialog(),
|
||||
);
|
||||
}),
|
||||
),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:kmobile/data/repositories/auth_repository.dart';
|
||||
import 'package:kmobile/features/profile/daily_transaction_limit.dart';
|
||||
import 'package:kmobile/features/profile/logout_dialog.dart';
|
||||
@@ -188,11 +189,10 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
Container(
|
||||
width: 56,
|
||||
height: 56,
|
||||
decoration: BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: theme.colorScheme.surface,
|
||||
image: const DecorationImage(
|
||||
image: AssetImage('assets/images/logo.png'),
|
||||
child: CircleAvatar(
|
||||
radius: 50,
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/avatar_male.svg',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
@@ -221,17 +221,6 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
// Edit/Profile button (optional)
|
||||
TextButton.icon(
|
||||
onPressed: () {
|
||||
// TODO: Navigate to edit profile if required
|
||||
},
|
||||
icon: const Icon(Icons.edit, size: 18),
|
||||
label: const Text("Edit"),
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: theme.colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
@@ -24,8 +24,11 @@ class SecuritySettingsScreen extends StatelessWidget {
|
||||
body: Stack(
|
||||
children: [
|
||||
ListView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
children: [
|
||||
ListTile(
|
||||
Card(
|
||||
margin: const EdgeInsets.only(bottom: 10),
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.lock_outline),
|
||||
title: Text(loc.changeLoginPassword),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
@@ -40,8 +43,10 @@ class SecuritySettingsScreen extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
),
|
||||
Divider(height: 1, color: Theme.of(context).dividerColor),
|
||||
ListTile(
|
||||
),
|
||||
Card(
|
||||
margin: const EdgeInsets.only(bottom: 10),
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.pin),
|
||||
title: Text(loc.changeMpin),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
@@ -64,8 +69,10 @@ class SecuritySettingsScreen extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
),
|
||||
Divider(height: 1, color: Theme.of(context).dividerColor),
|
||||
ListTile(
|
||||
),
|
||||
Card(
|
||||
margin: const EdgeInsets.only(bottom: 10),
|
||||
child: ListTile(
|
||||
leading: const Icon(Icons.password),
|
||||
title: const Text('Change TPIN'),
|
||||
trailing: const Icon(Icons.chevron_right),
|
||||
@@ -118,6 +125,7 @@ class SecuritySettingsScreen extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
IgnorePointer(
|
||||
|
||||
@@ -114,6 +114,7 @@ flutter:
|
||||
- assets/images/yes_bank_logo.png
|
||||
- assets/images/uco_logo.png
|
||||
- assets/images/ipos_logo.png
|
||||
- assets/images/profile.svg
|
||||
- assets/animations/rupee.json
|
||||
- assets/animations/error.json
|
||||
- assets/animations/done.json
|
||||
|
||||
Reference in New Issue
Block a user