Screen design of Dashboard & customer Info

This commit is contained in:
2025-04-28 17:57:32 +05:30
parent fa6690165d
commit 3108093686
16 changed files with 585 additions and 323 deletions

View File

@@ -0,0 +1,18 @@
import 'package:flutter/material.dart';
class CardScreen extends StatefulWidget {
const CardScreen({super.key});
@override
State<CardScreen> createState() => _CardScreen();
}
class _CardScreen extends State<CardScreen>{
@override
Widget build(BuildContext context) {
return Scaffold(
);
}
}

View File

@@ -0,0 +1,104 @@
import 'package:flutter/material.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
class CustomerInfoScreen extends StatefulWidget {
const CustomerInfoScreen({super.key});
@override
State<CustomerInfoScreen> createState() => _CustomerInfoScreen();
}
class _CustomerInfoScreen extends State<CustomerInfoScreen>{
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: IconButton(icon: const Icon(Symbols.arrow_back_ios_new),
onPressed: () {
Navigator.pop(context);
},),
title: const Text('kMobile', style: TextStyle(color: Colors.black,
fontWeight: FontWeight.w500),),
actions: const [
Padding(
padding: EdgeInsets.only(right: 10.0),
child: CircleAvatar(
backgroundImage: AssetImage('assets/images/avatar.jpg'), // Replace with your image
radius: 20,
),
),
],
),
body: const SingleChildScrollView(
physics: AlwaysScrollableScrollPhysics(),
child: Padding(
padding: EdgeInsets.all(16.0),
child: SafeArea(
child: Center(
child: Column(
children: [
SizedBox(height: 30),
CircleAvatar(
backgroundImage: AssetImage('assets/images/avatar.jpg'), // Replace with your image
radius: 50,
),
Padding(
padding: EdgeInsets.only(top: 10.0),
child: Text('Trina Bakshi', style: TextStyle(fontSize: 20,
color: Colors.black, fontWeight: FontWeight.w500),),
),
Text('CIF: 2553677487774', style: TextStyle(fontSize: 16, color: Colors.grey),),
SizedBox(height: 30,),
InfoField(label: 'Number of Active Accounts', value: '3'),
InfoField(label: 'Mobile Number', value: '987XXXXX78'),
InfoField(label: 'Date of Birth', value: '12-07-1984'),
InfoField(label: 'Branch', value: 'Krishnapur'),
InfoField(label: 'Aadhar Number', value: '7665 XXXX 1276'),
InfoField(label: 'PAN Number', value: '700127638009871'),
],
),
),
),
)),
);
}
}
class InfoField extends StatelessWidget {
final String label;
final String value;
const InfoField({Key? key, required this.label, required this.value}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
margin: const EdgeInsets.symmetric(vertical: 8),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
label,
style: const TextStyle(
fontSize: 15,
fontWeight: FontWeight.w500,
color: Colors.black87,
),
),
const SizedBox(height: 3),
Text(
value,
style: const TextStyle(
fontSize: 16,
color: Colors.black,
),
),
],
),
);
}
}

View File

@@ -1,6 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_svg/svg.dart';
import 'package:kmobile/features/auth/screens/mpin_screen.dart';
import '../../../app.dart';
import '../controllers/auth_cubit.dart';
import '../controllers/auth_state.dart';
import '../../dashboard/screens/dashboard_screen.dart';
@@ -46,7 +48,7 @@ class LoginScreenState extends State<LoginScreen> {
listener: (context, state) {
if (state is Authenticated) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (context) => const DashboardScreen()),
MaterialPageRoute(builder: (context) => const NavigationScaffold()),
);
} else if (state is AuthError) {
ScaffoldMessenger.of(context).showSnackBar(
@@ -64,7 +66,7 @@ class LoginScreenState extends State<LoginScreen> {
// crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
// Bank logo or app branding
const FlutterLogo(size: 100),
SvgPicture.asset('assets/images/kccb_logo.svg', width: 100, height: 100,),
const SizedBox(height: 16),
// Title
const Text(

View File

@@ -1,4 +1,11 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import '../../../app.dart';
import '../../dashboard/screens/dashboard_screen.dart';
import '../../../api/services/auth_service.dart';
import 'package:material_symbols_icons/get.dart';
class MPinScreen extends StatefulWidget {
const MPinScreen({super.key});
@@ -48,7 +55,7 @@ class MPinScreenState extends State<MPinScreen> {
['1', '2', '3'],
['4', '5', '6'],
['7', '8', '9'],
['', '0', '<']
['Enter', '0', '<']
];
return Column(
@@ -62,6 +69,17 @@ class MPinScreenState extends State<MPinScreen> {
onTap: () {
if (key == '<') {
deleteDigit();
} else if (key == 'Enter') {
if (mPin.length == 4) {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const NavigationScaffold()),
);
} else {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text("Please enter 4 digits")),
);
}
} else if (key.isNotEmpty) {
addDigit(key);
}
@@ -74,9 +92,14 @@ class MPinScreenState extends State<MPinScreen> {
color: Colors.grey[200],
),
alignment: Alignment.center,
child: Text(
child: key == 'Enter' ? const Icon(Symbols.check) : Text(
key == '<' ? '' : key,
style: const TextStyle(fontSize: 24),
style: TextStyle(
fontSize: 20,
fontWeight: key == 'Enter' ?
FontWeight.normal : FontWeight.normal,
color: key == 'Enter' ? Colors.blue : Colors.black,
),
),
),
),
@@ -107,7 +130,9 @@ class MPinScreenState extends State<MPinScreen> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
TextButton(onPressed: () {}, child: const Text("Try another way")),
TextButton(onPressed: () {
AuthService.authenticateWithBiometrics(context);
}, child: const Text("Try another way")),
TextButton(onPressed: () {}, child: const Text("Register?")),
],
),

View File

@@ -0,0 +1,17 @@
import 'package:flutter/material.dart';
class ServiceScreen extends StatefulWidget {
const ServiceScreen({super.key});
@override
State<ServiceScreen> createState() => _ServiceScreen();
}
class _ServiceScreen extends State<ServiceScreen>{
@override
Widget build(BuildContext context) {
return Scaffold(
);
}
}