beneficiary management

This commit is contained in:
2025-05-16 14:51:05 +05:30
parent 33066e6e4f
commit 0781aeb4e1
15 changed files with 409 additions and 13 deletions

View File

@@ -1,18 +0,0 @@
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

@@ -1,76 +0,0 @@
import 'package:flutter/material.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
class AccountInfoScreen extends StatefulWidget {
const AccountInfoScreen({super.key});
@override
State<AccountInfoScreen> createState() => _AccountInfoScreen();
}
class _AccountInfoScreen extends State<AccountInfoScreen>{
@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('Account Info', style: TextStyle(color: Colors.black,
fontWeight: FontWeight.w500),),
centerTitle: false,
actions: const [
Padding(
padding: EdgeInsets.only(right: 10.0),
child: CircleAvatar(
backgroundImage: AssetImage('assets/images/avatar.jpg'), // Replace with your image
radius: 20,
),
),
],
),
body: ListView(
padding: const EdgeInsets.all(16.0),
children: const [
InfoRow(title: 'Account Number', value: '700127638009871'),
InfoRow(title: 'Nominee Customer No', value: '700127638009871'),
InfoRow(title: 'SMS Service', value: 'Active'),
InfoRow(title: 'Missed Call Service', value: 'Active'),
InfoRow(title: 'Customer Number', value: '9000875272000212'),
InfoRow(title: 'Product Name', value: 'SAVINGS-PERSONAL'),
InfoRow(title: 'Account Opening Date', value: '12-09-2012'),
InfoRow(title: 'Account Status', value: 'OPEN'),
InfoRow(title: 'Available Balance', value: '12,000 CR'),
InfoRow(title: 'Interest Rate', value: '12.00'),
],
),
);
}
}
class InfoRow extends StatelessWidget {
final String title;
final String value;
const InfoRow({required this.title, required this.value, super.key});
@override
Widget build(BuildContext context) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 6.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(title,
style: const TextStyle(
fontWeight: FontWeight.bold, fontSize: 14)),
const SizedBox(height: 4),
Text(value, style: const TextStyle(fontSize: 14)),
const SizedBox(height: 10),
],
),
);
}
}

View File

@@ -1,183 +0,0 @@
import 'package:flutter/material.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
class AccountStatementScreen extends StatefulWidget {
const AccountStatementScreen({super.key});
@override
State<AccountStatementScreen> createState() => _AccountStatementScreen();
}
class _AccountStatementScreen extends State<AccountStatementScreen>{
DateTimeRange? selectedDateRange;
final _amountRangeController = TextEditingController(text: "100-500");
final transactions = [
{"desc": "Transfer From ICICI Bank subsidy", "amount": "+₹133.98", "type": "Cr", "time": "21-02-2024 13:09:30"},
{"desc": "Mobile recharge", "amount": "-₹299.00", "type": "Dr", "time": "21-02-2024 13:09:30"},
{"desc": "NEFT received from Jaya Saha", "amount": "+₹987.80", "type": "Cr", "time": "21-02-2024 13:09:30"},
{"desc": "Transfer From ICICI Bank subsidy", "amount": "+₹100.00", "type": "Cr", "time": "21-02-2024 13:09:30"},
{"desc": "Transfer From ICICI Bank subsidy", "amount": "-₹100.00", "type": "Dr", "time": "21-02-2024 13:09:30"},
{"desc": "Transfer From ICICI Bank subsidy", "amount": "+₹100.00", "type": "Cr", "time": "21-02-2024 13:09:30"},
{"desc": "Transfer From ICICI Bank subsidy", "amount": "+₹100.00", "type": "Cr", "time": "21-02-2024 13:09:30"},
];
Future<void> _selectDateRange(BuildContext context) async {
final DateTime now = DateTime.now();
final DateTimeRange? picked = await showDateRangePicker(
context: context,
firstDate: DateTime(2023),
lastDate: now, // disables future dates
initialDateRange: selectedDateRange ??
DateTimeRange(start: now.subtract(const Duration(days: 7)), end: now),
);
if (picked != null) {
setState(() {
selectedDateRange = picked;
});
}
}
String _formatDate(DateTime date) {
return "${date.day.toString().padLeft(2, '0')}-"
"${date.month.toString().padLeft(2, '0')}-"
"${date.year}";
}
@override
void dispose() {
_amountRangeController.dispose();
super.dispose();
}
@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('Account Statement', style: TextStyle(color: Colors.black,
fontWeight: FontWeight.w500),),
centerTitle: false,
actions: const [
Padding(
padding: EdgeInsets.only(right: 10.0),
child: CircleAvatar(
backgroundImage: AssetImage('assets/images/avatar.jpg'), // Replace with your image
radius: 20,
),
),
],
),
body: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text('Filters', style: TextStyle(fontSize: 17),),
const SizedBox(height: 15,),
Row(
children: [
Expanded(child: _buildDateRangeSelector()),
const SizedBox(width: 10),
Expanded(child: _buildFilterBox("100-500")),
],
),
const SizedBox(height: 35),
Expanded(
child: ListView.builder(
itemCount: transactions.length,
itemBuilder: (context, index) {
final txn = transactions[index];
return _buildTransactionTile(txn);
},
),
),
],
),
),
);
}
Widget _buildDateRangeSelector() {
String label = "Select Date";
if (selectedDateRange != null) {
final from = _formatDate(selectedDateRange!.start);
final to = _formatDate(selectedDateRange!.end);
label = "$from - $to";
}
return GestureDetector(
onTap: () => _selectDateRange(context),
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 14),
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(8),
),
child: Row(
children: [
Expanded(child: Text(label, style: const TextStyle(fontSize: 16))),
const Icon(Icons.calendar_today),
],
),
),
);
}
Widget _buildFilterBox(String text) {
return TextFormField(
controller: _amountRangeController,
decoration: const InputDecoration(
labelText: 'Amount Range',
// prefixIcon: Icon(Icons.person),
border: OutlineInputBorder(),
isDense: true,
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.black, width: 2),
),
),
keyboardType: TextInputType.number,
textInputAction: TextInputAction.next,
validator: (value) {
if (value == null || value.isEmpty) {
return 'Please enter amount range';
}
return null;
},
);
}
Widget _buildTransactionTile(Map<String, String> txn) {
final isCredit = txn['type'] == "Cr";
final amountColor = isCredit ? Colors.green : Colors.red;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(txn['time']!, style: const TextStyle(color: Colors.grey)),
const SizedBox(height: 4),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(child: Text(txn['desc']!, style: const TextStyle(fontSize: 16))),
Text(
"${txn['amount']} ${txn['type']}",
style: TextStyle(color: amountColor, fontWeight: FontWeight.bold),
),
],
),
const SizedBox(height: 25),
],
);
}
}

View File

@@ -1,104 +0,0 @@
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

@@ -130,6 +130,7 @@ class LoginScreenState extends State<LoginScreen> {
},
),
),
textInputAction: TextInputAction.done,
obscureText: _obscurePassword,
validator: (value) {
if (value == null || value.isEmpty) {

View File

@@ -1,17 +0,0 @@
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(
);
}
}