107 lines
3.4 KiB
Dart
107 lines
3.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_svg/svg.dart';
|
|
import 'package:kmobile/features/beneficiaries/screens/add_beneficiary_screen.dart';
|
|
import 'package:kmobile/features/fund_transfer/screens/fund_transfer_screen.dart';
|
|
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
|
import '../../../l10n/app_localizations.dart';
|
|
|
|
class FundTransferBeneficiaryScreen extends StatefulWidget {
|
|
const FundTransferBeneficiaryScreen({super.key});
|
|
|
|
@override
|
|
State<FundTransferBeneficiaryScreen> createState() =>
|
|
_FundTransferBeneficiaryScreen();
|
|
}
|
|
|
|
class _FundTransferBeneficiaryScreen
|
|
extends State<FundTransferBeneficiaryScreen> {
|
|
final List<Map<String, String>> beneficiaries = [
|
|
{'bank': 'State Bank Of India', 'name': 'Trina Bakshi'},
|
|
{'bank': 'State Bank Of India', 'name': 'Sheetal Rao'},
|
|
{'bank': 'Punjab National Bank', 'name': 'Manoj Kumar'},
|
|
{'bank': 'State Bank Of India', 'name': 'Rohit Mehra'},
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: AppBar(
|
|
leading: IconButton(
|
|
icon: const Icon(Symbols.arrow_back_ios_new),
|
|
onPressed: () {
|
|
Navigator.pop(context);
|
|
},
|
|
),
|
|
title: Text(
|
|
AppLocalizations.of(context).fundTransferBeneficiary,
|
|
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
|
),
|
|
centerTitle: false,
|
|
actions: [
|
|
Padding(
|
|
padding: const EdgeInsets.only(right: 10.0),
|
|
child: CircleAvatar(
|
|
backgroundColor: Colors.grey[200],
|
|
radius: 20,
|
|
child: SvgPicture.asset(
|
|
'assets/images/avatar_male.svg',
|
|
width: 40,
|
|
height: 40,
|
|
fit: BoxFit.cover,
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
body: Padding(
|
|
padding: const EdgeInsets.all(8.0),
|
|
child: ListView.builder(
|
|
itemCount: beneficiaries.length,
|
|
itemBuilder: (context, index) {
|
|
final beneficiary = beneficiaries[index];
|
|
return ListTile(
|
|
leading: CircleAvatar(
|
|
backgroundColor: Theme.of(context).primaryColor,
|
|
child: Text('A'),
|
|
),
|
|
title: Text(beneficiary['name']!),
|
|
subtitle: Text(beneficiary['bank']!),
|
|
trailing: IconButton(
|
|
icon: const Icon(Symbols.arrow_right, size: 20),
|
|
onPressed: () {
|
|
// Delete action
|
|
},
|
|
),
|
|
onTap: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => const FundTransferScreen(),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
},
|
|
),
|
|
),
|
|
floatingActionButton: Padding(
|
|
padding: const EdgeInsets.only(bottom: 8.0),
|
|
child: FloatingActionButton(
|
|
onPressed: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => const AddBeneficiaryScreen(),
|
|
),
|
|
);
|
|
},
|
|
backgroundColor: Colors.grey[300],
|
|
foregroundColor: Theme.of(context).primaryColor,
|
|
elevation: 5,
|
|
child: const Icon(Icons.add),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|