Manage Beneficiary
This commit is contained in:
@@ -18,9 +18,12 @@ class _WelcomeScreenState extends State<WelcomeScreen> {
|
||||
super.initState();
|
||||
|
||||
// Automatically go to login after 6 seconds
|
||||
Timer(const Duration(seconds: 6), () {
|
||||
widget.onContinue();
|
||||
});
|
||||
// Timer(const Duration(seconds: 6), () {
|
||||
|
||||
|
||||
// }
|
||||
// );
|
||||
widget.onContinue();
|
||||
}
|
||||
|
||||
@override
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:kmobile/data/models/beneficiary.dart';
|
||||
import 'package:kmobile/features/beneficiaries/screens/add_beneficiary_screen.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
import '../../../di/injection.dart';
|
||||
import 'package:kmobile/api/services/beneficiary_service.dart';
|
||||
@@ -103,7 +102,7 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
|
||||
var service = getIt<BeneficiaryService>();
|
||||
//final BeneficiaryService _service = BeneficiaryService();
|
||||
bool _isLoading = true;
|
||||
List<dynamic> _beneficiaries = [];
|
||||
List<Beneficiary> _beneficiaries = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -114,7 +113,7 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
|
||||
Future<void> _loadBeneficiaries() async {
|
||||
final data = await service.fetchBeneficiaryList();
|
||||
setState(() {
|
||||
_beneficiaries = data;
|
||||
_beneficiaries = data ;
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
@@ -158,14 +157,14 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
|
||||
radius: 24,
|
||||
backgroundColor: Theme.of(context).primaryColor.withOpacity(0.2),
|
||||
child: Text(
|
||||
item['name'] != null && item['name'].isNotEmpty
|
||||
? item['name'][0].toUpperCase()
|
||||
item.name.isNotEmpty
|
||||
? item.name[0].toUpperCase()
|
||||
: '?',
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
title: Text(item['name'] ?? 'Unknown'),
|
||||
subtitle: Text(item['accountNumber'] ?? 'No account number'),
|
||||
title: Text(item.name ?? 'Unknown'),
|
||||
subtitle: Text(item.accountNo ?? 'No account number'),
|
||||
);
|
||||
},
|
||||
);
|
||||
|
@@ -202,7 +202,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
backgroundColor:Theme.of(context).scaffoldBackgroundColor,
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(
|
||||
AppLocalizations.of(context).kMobile,
|
||||
AppLocalizations.of(context).kconnect,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).primaryColor,
|
||||
fontWeight: FontWeight.w500,
|
||||
@@ -482,7 +482,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
const FundTransferBeneficiaryScreen()));
|
||||
}, disable: true),
|
||||
}, disable: false),
|
||||
_buildQuickLink(Symbols.server_person,
|
||||
AppLocalizations.of(context).accountInfo, () {
|
||||
Navigator.push(
|
||||
|
Reference in New Issue
Block a user