changed imports of AppLocalization

Also added beneficiary validation while quick pay within bank
This commit is contained in:
2025-07-24 22:21:19 +05:30
parent 23d742ace9
commit 787fcdc2e2
42 changed files with 3965 additions and 1025 deletions

View File

@@ -3,7 +3,7 @@ template-arb-file: app_en.arb
output-localization-file: app_localizations.dart
output-class: AppLocalizations
use-deferred-loading: false
synthetic-package: false
use-maybe-of: true
synthetic-package: true
nullable-getter : false
untranslated-message-file: l10n_missing_translations.json

View File

@@ -4,12 +4,12 @@ import '../../data/repositories/auth_repository.dart';
class AuthInterceptor extends Interceptor {
final AuthRepository _authRepository;
final Dio _dio;
AuthInterceptor(this._authRepository, this._dio);
@override
Future<void> onRequest(
RequestOptions options,
RequestOptions options,
RequestInterceptorHandler handler,
) async {
// Skip auth header for login and refresh endpoints
@@ -17,31 +17,38 @@ class AuthInterceptor extends Interceptor {
options.path.contains('/auth/refresh')) {
return handler.next(options);
}
// Get token and add to request
final token = await _authRepository.getAccessToken();
if (token != null) {
options.headers['Authorization'] = 'Bearer $token';
}
return handler.next(options);
}
@override
Future<void> onError(
DioException err,
DioException err,
ErrorInterceptorHandler handler,
) async {
// Handle 401 errors by refreshing token and retrying
if (err.response?.statusCode == 401) {
final response = err.response;
if (response?.statusCode == 401) {
final data = response?.data;
// Only refresh token if error is NOT INCORRECT_TPIN (or similar business error)
if (data is Map && data['error'] == 'INCORRECT_TPIN') {
// Pass the error through, do not retry
return handler.next(err);
}
// On 401, try to get a new token
final token = await _authRepository.getAccessToken();
if (token != null) {
// If we have a new token, retry the request
final opts = err.requestOptions;
opts.headers['Authorization'] = 'Bearer $token';
try {
final response = await _dio.fetch(opts);
return handler.resolve(response);
@@ -50,7 +57,7 @@ class AuthInterceptor extends Interceptor {
}
}
}
return handler.next(err);
}
}
}

View File

@@ -0,0 +1,25 @@
import 'package:dio/dio.dart';
class BeneficiaryService {
final Dio _dio;
BeneficiaryService(this._dio);
Future<String> validateBeneficiaryWithinBank(String accountNumber) async {
try {
final response = await _dio.get('/api/beneficiary/validate/within-bank', queryParameters: {
'accountNumber': accountNumber,
});
if (response.statusCode == 200) {
return response.data['name'];
} else {
throw Exception(response.data['error'] ?? 'Failed to validate beneficiary');
}
} on DioException catch (e) {
throw Exception('Network error: ${e.message}');
} catch (e) {
throw Exception('Unexpected error: ${e.toString()}');
}
}
}

View File

@@ -11,8 +11,8 @@ class PaymentService {
Future<PaymentResponse> processQuickPayWithinBank(Transfer transfer) async {
try {
await Future.delayed(const Duration(seconds: 3)); // Simulate delay
final response =
await _dio.post('/api/payment/transfer', data: transfer.toJson());
await _dio.post('/api/payment/transfer', data: transfer.toJson());
return PaymentResponse(
isSuccess: true,
@@ -20,8 +20,6 @@ class PaymentService {
creditedAccount: transfer.toAccount,
amount: transfer.amount,
currency: "INR",
errorMessage: response.data['errorMessage'],
errorCode: response.data['errorCode'],
);
} on DioException catch (e) {
log('DioException: ${e.toString()}');

View File

@@ -4,7 +4,7 @@ import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:kmobile/security/secure_storage.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import './l10n/app_localizations.dart';
import 'config/themes.dart';
import 'config/routes.dart';
import 'di/injection.dart';
@@ -14,7 +14,6 @@ import 'features/auth/screens/welcome_screen.dart';
import 'features/auth/screens/login_screen.dart';
import 'features/service/screens/service_screen.dart';
import 'features/dashboard/screens/dashboard_screen.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'features/auth/screens/mpin_screen.dart';
import 'package:local_auth/local_auth.dart';
@@ -25,8 +24,8 @@ class KMobile extends StatefulWidget {
State<KMobile> createState() => _KMobileState();
static void setLocale(BuildContext context, Locale newLocale) {
final _KMobileState? state =
context.findAncestorStateOfType<_KMobileState>();
final _KMobileState? state = context
.findAncestorStateOfType<_KMobileState>();
state?.setLocale(newLocale);
}
}
@@ -113,16 +112,11 @@ class _KMobileState extends State<KMobile> {
);
return MultiBlocProvider(
providers: [
BlocProvider<AuthCubit>(create: (_) => getIt<AuthCubit>()),
],
providers: [BlocProvider<AuthCubit>(create: (_) => getIt<AuthCubit>())],
child: MaterialApp(
debugShowCheckedModeBanner: false,
locale: _locale, // Use your existing locale variable
supportedLocales: const [
Locale('en'),
Locale('hi'),
],
supportedLocales: const [Locale('en'), Locale('hi')],
localizationsDelegates: const [
AppLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
@@ -169,7 +163,8 @@ class _AuthGateState extends State<AuthGate> {
final mpin = await storage.read('mpin');
final biometric = await storage.read('biometric_enabled');
setState(() {
_isLoggedIn = accessToken != null &&
_isLoggedIn =
accessToken != null &&
accessTokenExpiry != null &&
DateTime.parse(accessTokenExpiry).isAfter(DateTime.now());
_hasMPin = mpin != null;
@@ -198,7 +193,7 @@ class _AuthGateState extends State<AuthGate> {
}
}
/* @override
/* @override
Widget build(BuildContext context) {
if (_checking) {
return const SplashScreen();
@@ -336,9 +331,7 @@ class _AuthGateState extends State<AuthGate> {
mode: MPinMode.enter,
onCompleted: (_) {
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (_) => const NavigationScaffold(),
),
MaterialPageRoute(builder: (_) => const NavigationScaffold()),
);
},
);
@@ -353,8 +346,9 @@ class _AuthGateState extends State<AuthGate> {
context: context,
barrierDismissible: false,
builder: (ctx) => AlertDialog(
title:
Text(AppLocalizations.of(context).enableFingerprintLogin),
title: Text(
AppLocalizations.of(context).enableFingerprintLogin,
),
content: Text(
AppLocalizations.of(context).enableFingerprintMessage,
),
@@ -377,8 +371,9 @@ class _AuthGateState extends State<AuthGate> {
if (canCheck) {
didAuth = await localAuth.authenticate(
localizedReason:
AppLocalizations.of(context).authenticateToEnable,
localizedReason: AppLocalizations.of(
context,
).authenticateToEnable,
options: const AuthenticationOptions(
stickyAuth: true,
biometricOnly: true,
@@ -395,9 +390,7 @@ class _AuthGateState extends State<AuthGate> {
}
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (_) => const NavigationScaffold(),
),
MaterialPageRoute(builder: (_) => const NavigationScaffold()),
);
},
);
@@ -480,26 +473,27 @@ class _NavigationScaffoldState extends State<NavigationScaffold> {
children: _pages,
),
bottomNavigationBar: BottomNavigationBar(
currentIndex: _selectedIndex,
type: BottomNavigationBarType.fixed,
backgroundColor: const Color(0xFFE0F7FA), // Light blue background
selectedItemColor: Colors.blue[800],
unselectedItemColor: Colors.black54,
onTap: _onItemTapped,
items: [
BottomNavigationBarItem(
icon: const Icon(Icons.home_filled),
label: AppLocalizations.of(context).home,
),
BottomNavigationBarItem(
icon: const Icon(Icons.credit_card),
label: AppLocalizations.of(context).card,
),
BottomNavigationBarItem(
icon: const Icon(Icons.miscellaneous_services),
label: AppLocalizations.of(context).services,
),
]),
currentIndex: _selectedIndex,
type: BottomNavigationBarType.fixed,
backgroundColor: const Color(0xFFE0F7FA), // Light blue background
selectedItemColor: Colors.blue[800],
unselectedItemColor: Colors.black54,
onTap: _onItemTapped,
items: [
BottomNavigationBarItem(
icon: const Icon(Icons.home_filled),
label: AppLocalizations.of(context).home,
),
BottomNavigationBarItem(
icon: const Icon(Icons.credit_card),
label: AppLocalizations.of(context).card,
),
BottomNavigationBarItem(
icon: const Icon(Icons.miscellaneous_services),
label: AppLocalizations.of(context).services,
),
],
),
),
);
}
@@ -517,8 +511,10 @@ class SplashScreen extends StatelessWidget {
children: [
const CircularProgressIndicator(),
const SizedBox(height: 20),
Text(AppLocalizations.of(context).loading,
style: Theme.of(context).textTheme.headlineMedium),
Text(
AppLocalizations.of(context).loading,
style: Theme.of(context).textTheme.headlineMedium,
),
],
),
),

View File

@@ -116,7 +116,7 @@ class AppThemes {
foregroundColor: Color(0xFF212121),
centerTitle: true,
),
cardTheme: CardTheme(
cardTheme: CardThemeData(
//Earlier CardThemeData
elevation: 2,
shape: RoundedRectangleBorder(
@@ -200,7 +200,7 @@ class AppThemes {
foregroundColor: Colors.white,
centerTitle: true,
),
cardTheme: CardTheme(
cardTheme: CardThemeData(
//Earlier was CardThemeData
elevation: 2,
shape: RoundedRectangleBorder(

View File

@@ -1,5 +1,6 @@
import 'package:get_it/get_it.dart';
import 'package:dio/dio.dart';
import 'package:kmobile/api/services/beneficiary_service.dart';
import 'package:kmobile/api/services/payment_service.dart';
import 'package:kmobile/api/services/user_service.dart';
import 'package:kmobile/data/repositories/transaction_repository.dart';
@@ -33,6 +34,7 @@ Future<void> setupDependencies() async {
TransactionRepositoryImpl(getIt<Dio>()));
getIt.registerSingleton<PaymentService>(PaymentService(getIt<Dio>()));
getIt.registerSingleton<BeneficiaryService>(BeneficiaryService(getIt<Dio>()));
// Add auth interceptor after repository is available
getIt<Dio>().interceptors.add(

View File

@@ -2,14 +2,17 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:kmobile/data/models/user.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class AccountInfoScreen extends StatefulWidget {
final List<User> users;
final int selectedIndex;
const AccountInfoScreen(
{super.key, required this.users, required this.selectedIndex});
const AccountInfoScreen({
super.key,
required this.users,
required this.selectedIndex,
});
@override
State<AccountInfoScreen> createState() => _AccountInfoScreen();
@@ -37,8 +40,10 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
),
title: Text(
AppLocalizations.of(context).accountInfo,
style:
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
style: const TextStyle(
color: Colors.black,
fontWeight: FontWeight.w500,
),
),
centerTitle: false,
actions: [
@@ -62,10 +67,7 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
children: [
Text(
AppLocalizations.of(context).accountNumber,
style: const TextStyle(
fontWeight: FontWeight.w500,
fontSize: 14,
),
style: const TextStyle(fontWeight: FontWeight.w500, fontSize: 14),
),
/// Dropdown to change account
@@ -93,25 +95,32 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
// InfoRow(title: 'SMS Service', value: user.smsService),
// InfoRow(title: 'Missed Call Service', value: user.missedCallService),*/
InfoRow(
title: AppLocalizations.of(context).customerNumber,
value: selectedUser.cifNumber ?? 'N/A'),
title: AppLocalizations.of(context).customerNumber,
value: selectedUser.cifNumber ?? 'N/A',
),
InfoRow(
title: AppLocalizations.of(context).productName,
value: selectedUser.productType ?? 'N/A'),
title: AppLocalizations.of(context).productName,
value: selectedUser.productType ?? 'N/A',
),
// InfoRow(title: 'Account Opening Date', value: users[selectedIndex].accountOpeningDate ?? 'N/A'),
InfoRow(
title: AppLocalizations.of(context).accountStatus, value: 'OPEN'),
title: AppLocalizations.of(context).accountStatus,
value: 'OPEN',
),
InfoRow(
title: AppLocalizations.of(context).availableBalance,
value: selectedUser.availableBalance ?? 'N/A'),
title: AppLocalizations.of(context).availableBalance,
value: selectedUser.availableBalance ?? 'N/A',
),
InfoRow(
title: AppLocalizations.of(context).currentBalance,
value: selectedUser.currentBalance ?? 'N/A'),
title: AppLocalizations.of(context).currentBalance,
value: selectedUser.currentBalance ?? 'N/A',
),
users[selectedIndex].approvedAmount != null
? InfoRow(
title: AppLocalizations.of(context).approvedAmount,
value: selectedUser.approvedAmount ?? 'N/A')
value: selectedUser.approvedAmount ?? 'N/A',
)
: const SizedBox.shrink(),
],
),
@@ -144,10 +153,7 @@ class InfoRow extends StatelessWidget {
const SizedBox(height: 3),
Text(
value,
style: const TextStyle(
fontSize: 16,
color: Colors.black,
),
style: const TextStyle(fontSize: 16, color: Colors.black),
),
],
),

View File

@@ -5,14 +5,11 @@ import 'package:shimmer/shimmer.dart';
import 'package:kmobile/data/models/transaction.dart';
import 'package:kmobile/data/repositories/transaction_repository.dart';
import 'package:kmobile/di/injection.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class AccountStatementScreen extends StatefulWidget {
final String accountNo;
const AccountStatementScreen({
super.key,
required this.accountNo,
});
const AccountStatementScreen({super.key, required this.accountNo});
@override
State<AccountStatementScreen> createState() => _AccountStatementScreen();
@@ -45,8 +42,10 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
'${AppLocalizations.of(context).failedToLoadTransactions} $e')),
content: Text(
'${AppLocalizations.of(context).failedToLoadTransactions} $e',
),
),
);
} finally {
setState(() => _txLoading = false);
@@ -73,7 +72,8 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
if (fromDate == null) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(AppLocalizations.of(context).pleaseSelectDateFirst)),
content: Text(AppLocalizations.of(context).pleaseSelectDateFirst),
),
);
return;
}
@@ -115,7 +115,7 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
),
title: Text(
AppLocalizations.of(context).accountStatement,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
style: const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
centerTitle: false,
actions: [
@@ -141,15 +141,21 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
children: [
Row(
children: [
Text("${AppLocalizations.of(context).accountNumber}: ",
style: const TextStyle(
fontSize: 19, fontWeight: FontWeight.bold)),
Text(
"${AppLocalizations.of(context).accountNumber}: ",
style: const TextStyle(
fontSize: 19,
fontWeight: FontWeight.bold,
),
),
Text(widget.accountNo, style: const TextStyle(fontSize: 17)),
],
),
const SizedBox(height: 15),
Text(AppLocalizations.of(context).filters,
style: const TextStyle(fontSize: 17)),
Text(
AppLocalizations.of(context).filters,
style: const TextStyle(fontSize: 17),
),
const SizedBox(height: 15),
Row(
children: [
@@ -157,7 +163,9 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
child: GestureDetector(
onTap: () => _selectFromDate(context),
child: buildDateBox(
AppLocalizations.of(context).fromDate, fromDate),
AppLocalizations.of(context).fromDate,
fromDate,
),
),
),
const SizedBox(width: 10),
@@ -165,7 +173,9 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
child: GestureDetector(
onTap: () => _selectToDate(context),
child: buildDateBox(
AppLocalizations.of(context).toDate, toDate),
AppLocalizations.of(context).toDate,
toDate,
),
),
),
],
@@ -178,7 +188,7 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
controller: _minAmountController,
decoration: InputDecoration(
labelText: AppLocalizations.of(context).minAmount,
border: OutlineInputBorder(),
border: const OutlineInputBorder(),
isDense: true,
filled: true,
fillColor: Colors.white,
@@ -193,7 +203,7 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
controller: _maxAmountController,
decoration: InputDecoration(
labelText: AppLocalizations.of(context).maxAmount,
border: OutlineInputBorder(),
border: const OutlineInputBorder(),
isDense: true,
filled: true,
fillColor: Colors.white,
@@ -241,19 +251,27 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
baseColor: Colors.grey[300]!,
highlightColor: Colors.grey[100]!,
child: const CircleAvatar(
radius: 12, backgroundColor: Colors.white),
radius: 12,
backgroundColor: Colors.white,
),
),
title: Shimmer.fromColors(
baseColor: Colors.grey[300]!,
highlightColor: Colors.grey[100]!,
child: Container(
height: 10, width: 100, color: Colors.white),
height: 10,
width: 100,
color: Colors.white,
),
),
subtitle: Shimmer.fromColors(
baseColor: Colors.grey[300]!,
highlightColor: Colors.grey[100]!,
child: Container(
height: 8, width: 60, color: Colors.white),
height: 8,
width: 60,
color: Colors.white,
),
),
),
)
@@ -262,44 +280,37 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
child: Text(
AppLocalizations.of(context).noTransactions,
style: TextStyle(
fontSize: 16,
color: Colors.grey[600],
),
fontSize: 16, color: Colors.grey[600]),
),
)
: ListView.builder(
itemCount: _transactions.length,
itemBuilder: (context, index) {
final txn = _transactions[index];
final isCredit = txn.type == 'CR';
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(txn.date ?? '',
style: const TextStyle(color: Colors.grey)),
const SizedBox(height: 4),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(txn.name ?? '',
style: const TextStyle(fontSize: 16)),
),
Text(
"${isCredit ? '+' : '-'}${txn.amount}",
style: TextStyle(
color: isCredit
? Colors.green
: Colors.red,
// fontWeight: FontWeight.bold,
fontSize: 16,
),
),
],
),
const SizedBox(height: 25),
],
final tx = _transactions[index];
return ListTile(
leading: Icon(
tx.type == 'CR'
? Symbols.call_received
: Symbols.call_made,
color:
tx.type == 'CR' ? Colors.green : Colors.red,
),
title: Text(
tx.name != null
? (tx.name!.length > 18
? tx.name!.substring(0, 20)
: tx.name!)
: '',
style: const TextStyle(fontSize: 14),
),
subtitle: Text(
tx.date ?? '',
style: const TextStyle(fontSize: 12),
),
trailing: Text(
"${tx.amount}",
style: const TextStyle(fontSize: 16),
),
);
},
),

View File

@@ -1,4 +1,4 @@
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
@@ -48,9 +48,9 @@ class LoginScreenState extends State<LoginScreen>
void _submitForm() {
if (_formKey.currentState!.validate()) {
context.read<AuthCubit>().login(
_customerNumberController.text.trim(),
_passwordController.text,
);
_customerNumberController.text.trim(),
_passwordController.text,
);
}
}
@@ -69,10 +69,13 @@ class LoginScreenState extends State<LoginScreen>
builder: (_) => MPinScreen(
mode: MPinMode.set,
onCompleted: (_) {
Navigator.of(context, rootNavigator: true)
.pushReplacement(
Navigator.of(
context,
rootNavigator: true,
).pushReplacement(
MaterialPageRoute(
builder: (_) => const NavigationScaffold()),
builder: (_) => const NavigationScaffold(),
),
);
},
),
@@ -84,9 +87,9 @@ class LoginScreenState extends State<LoginScreen>
);
}
} else if (state is AuthError) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text(state.message)),
);
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text(state.message)));
}
},
builder: (context, state) {
@@ -97,7 +100,7 @@ class LoginScreenState extends State<LoginScreen>
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
// 🔁 Animated Blinking Logo
// 🔁 Animated Blinking Logo
FadeTransition(
opacity: _logoAnimation,
child: Image.asset(
@@ -105,8 +108,11 @@ class LoginScreenState extends State<LoginScreen>
width: 150,
height: 150,
errorBuilder: (context, error, stackTrace) {
return const Icon(Icons.account_balance,
size: 100, color: Colors.blue);
return const Icon(
Icons.account_balance,
size: 100,
color: Colors.blue,
);
},
),
),
@@ -115,9 +121,10 @@ class LoginScreenState extends State<LoginScreen>
Text(
AppLocalizations.of(context).kccb,
style: TextStyle(
fontSize: 32,
fontWeight: FontWeight.bold,
color: Colors.blue),
fontSize: 32,
fontWeight: FontWeight.bold,
color: Colors.blue,
),
),
const SizedBox(height: 48),
@@ -147,7 +154,7 @@ class LoginScreenState extends State<LoginScreen>
},
),
const SizedBox(height: 24),
// Password
// Password
TextFormField(
controller: _passwordController,
obscureText: _obscurePassword,
@@ -233,10 +240,11 @@ class LoginScreenState extends State<LoginScreen>
//disable until registration is implemented
onPressed: null,
style: OutlinedButton.styleFrom(
shape: const StadiumBorder(),
padding: const EdgeInsets.symmetric(vertical: 16),
backgroundColor: Colors.lightBlue[100],
foregroundColor: Colors.black),
shape: const StadiumBorder(),
padding: const EdgeInsets.symmetric(vertical: 16),
backgroundColor: Colors.lightBlue[100],
foregroundColor: Colors.black,
),
child: Text(AppLocalizations.of(context).register),
),
),
@@ -250,7 +258,6 @@ class LoginScreenState extends State<LoginScreen>
}
}
/*import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:kmobile/di/injection.dart';

View File

@@ -1,4 +1,4 @@
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'dart:developer';
@@ -155,7 +155,7 @@ class _MPinScreenState extends State<MPinScreen> {
['1', '2', '3'],
['4', '5', '6'],
['7', '8', '9'],
['Enter', '0', '<']
['Enter', '0', '<'],
];
return Column(
@@ -174,8 +174,9 @@ class _MPinScreenState extends State<MPinScreen> {
_handleComplete();
} else {
setState(() {
errorText =
AppLocalizations.of(context).pleaseEnter4Digits;
errorText = AppLocalizations.of(
context,
).pleaseEnter4Digits;
});
}
} else if (key.isNotEmpty) {
@@ -238,8 +239,10 @@ class _MPinScreenState extends State<MPinScreen> {
if (errorText != null)
Padding(
padding: const EdgeInsets.only(top: 8.0),
child:
Text(errorText!, style: const TextStyle(color: Colors.red)),
child: Text(
errorText!,
style: const TextStyle(color: Colors.red),
),
),
const Spacer(),
buildNumberPad(),

View File

@@ -1,4 +1,4 @@
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'package:flutter/material.dart';
import 'dart:async';
@@ -70,9 +70,7 @@ class _WelcomeScreenState extends State<WelcomeScreen> {
left: 0,
right: 0,
child: Center(
child: CircularProgressIndicator(
color: Colors.white,
),
child: CircularProgressIndicator(color: Colors.white),
),
),
],
@@ -138,6 +136,3 @@ class WelcomeScreen extends StatelessWidget {
}
}
*/

View File

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class AddBeneficiaryScreen extends StatefulWidget {
const AddBeneficiaryScreen({super.key});
@@ -56,9 +56,7 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
onPressed: () {
// Navigate to Payment Screen or do something
},
style: TextButton.styleFrom(
foregroundColor: Colors.blue[200],
),
style: TextButton.styleFrom(foregroundColor: Colors.blue[200]),
child: Text(AppLocalizations.of(context).payNow),
),
IconButton(
@@ -88,7 +86,8 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
return;
}
await Future.delayed(
const Duration(seconds: 2)); //Mock delay for 2 sec to imitate api call
const Duration(seconds: 2),
); //Mock delay for 2 sec to imitate api call
// 🔹 Mock IFSC lookup (you can replace this with API)
const mockIfscData = {
'KCCB0001234': {
@@ -170,8 +169,9 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
TextFormField(
controller: accountNumberController,
decoration: InputDecoration(
labelText:
AppLocalizations.of(context).accountNumber,
labelText: AppLocalizations.of(
context,
).accountNumber,
// prefixIcon: Icon(Icons.person),
border: OutlineInputBorder(),
isDense: true,
@@ -181,8 +181,10 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderSide:
BorderSide(color: Colors.black, width: 2),
borderSide: BorderSide(
color: Colors.black,
width: 2,
),
),
),
obscureText: true,
@@ -190,8 +192,9 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
textInputAction: TextInputAction.next,
validator: (value) {
if (value == null || value.length < 10) {
return AppLocalizations.of(context)
.enterValidAccountNumber;
return AppLocalizations.of(
context,
).enterValidAccountNumber;
}
return null;
},
@@ -201,8 +204,9 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
TextFormField(
controller: confirmAccountNumberController,
decoration: InputDecoration(
labelText: AppLocalizations.of(context)
.confirmAccountNumber,
labelText: AppLocalizations.of(
context,
).confirmAccountNumber,
// prefixIcon: Icon(Icons.person),
border: OutlineInputBorder(),
isDense: true,
@@ -212,20 +216,24 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderSide:
BorderSide(color: Colors.black, width: 2),
borderSide: BorderSide(
color: Colors.black,
width: 2,
),
),
),
keyboardType: TextInputType.number,
textInputAction: TextInputAction.next,
validator: (value) {
if (value == null || value.isEmpty) {
return AppLocalizations.of(context)
.reenterAccountNumber;
return AppLocalizations.of(
context,
).reenterAccountNumber;
}
if (value != accountNumberController.text) {
return AppLocalizations.of(context)
.accountMismatch;
return AppLocalizations.of(
context,
).accountMismatch;
}
return null;
},
@@ -244,8 +252,10 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderSide:
BorderSide(color: Colors.black, width: 2),
borderSide: BorderSide(
color: Colors.black,
width: 2,
),
),
),
textInputAction: TextInputAction.next,
@@ -371,8 +381,10 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderSide:
BorderSide(color: Colors.black, width: 2),
borderSide: BorderSide(
color: Colors.black,
width: 2,
),
),
),
textCapitalization: TextCapitalization.characters,
@@ -392,10 +404,12 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
final pattern = RegExp(r'^[A-Z]{4}0[A-Z0-9]{6}$');
if (value == null || value.trim().isEmpty) {
return AppLocalizations.of(context).enterIfsc;
} else if (!pattern
.hasMatch(value.trim().toUpperCase())) {
return AppLocalizations.of(context)
.invalidIfscFormat;
} else if (!pattern.hasMatch(
value.trim().toUpperCase(),
)) {
return AppLocalizations.of(
context,
).invalidIfscFormat;
}
return null;
},
@@ -416,8 +430,10 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderSide:
BorderSide(color: Colors.black, width: 2),
borderSide: BorderSide(
color: Colors.black,
width: 2,
),
),
),
),
@@ -437,8 +453,10 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderSide:
BorderSide(color: Colors.black, width: 2),
borderSide: BorderSide(
color: Colors.black,
width: 2,
),
),
),
),
@@ -457,19 +475,24 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderSide:
BorderSide(color: Colors.black, width: 2),
borderSide: BorderSide(
color: Colors.black,
width: 2,
),
),
),
items: [
AppLocalizations.of(context).savings,
AppLocalizations.of(context).current
]
.map((type) => DropdownMenuItem(
value: type,
child: Text(type),
))
.toList(),
items:
[
AppLocalizations.of(context).savings,
AppLocalizations.of(context).current,
]
.map(
(type) => DropdownMenuItem(
value: type,
child: Text(type),
),
)
.toList(),
onChanged: (value) {
setState(() {
accountType = value!;
@@ -492,15 +515,17 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
borderSide:
BorderSide(color: Colors.black, width: 2),
borderSide: BorderSide(
color: Colors.black,
width: 2,
),
),
),
textInputAction: TextInputAction.done,
validator: (value) =>
value == null || value.length != 10
? AppLocalizations.of(context).enterValidPhone
: null,
? AppLocalizations.of(context).enterValidPhone
: null,
),
const SizedBox(height: 35),
],

View File

@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:kmobile/features/beneficiaries/screens/add_beneficiary_screen.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class ManageBeneficiariesScreen extends StatefulWidget {
const ManageBeneficiariesScreen({super.key});
@@ -14,22 +14,10 @@ class ManageBeneficiariesScreen extends StatefulWidget {
class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
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',
},
{'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
@@ -71,7 +59,9 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
final beneficiary = beneficiaries[index];
return ListTile(
leading: const CircleAvatar(
backgroundColor: Colors.blue, child: Text('A')),
backgroundColor: Colors.blue,
child: Text('A'),
),
title: Text(beneficiary['name']!),
subtitle: Text(beneficiary['bank']!),
trailing: IconButton(
@@ -89,9 +79,11 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
child: FloatingActionButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const AddBeneficiaryScreen()));
context,
MaterialPageRoute(
builder: (context) => const AddBeneficiaryScreen(),
),
);
},
backgroundColor: Colors.grey[300],
foregroundColor: Colors.blue[900],

View File

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:intl/intl.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
class BlockCardScreen extends StatefulWidget {

View File

@@ -3,7 +3,7 @@ import 'package:flutter_svg/svg.dart';
import 'package:kmobile/features/card/screens/block_card_screen.dart';
import 'package:kmobile/features/card/screens/card_pin_change_details_screen.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class CardManagementScreen extends StatefulWidget {
const CardManagementScreen({super.key});
@@ -46,36 +46,33 @@ class _CardManagementScreen extends State<CardManagementScreen> {
label: AppLocalizations.of(context).applyDebitCard,
onTap: () {},
),
const Divider(
height: 1,
),
const Divider(height: 1),
CardManagementTile(
icon: Symbols.remove_moderator,
label: AppLocalizations.of(context).blockUnblockCard,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const BlockCardScreen()));
context,
MaterialPageRoute(
builder: (context) => const BlockCardScreen(),
),
);
},
),
const Divider(
height: 1,
),
const Divider(height: 1),
CardManagementTile(
icon: Symbols.password_2,
label: AppLocalizations.of(context).changeCardPin,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const CardPinChangeDetailsScreen()));
context,
MaterialPageRoute(
builder: (context) => const CardPinChangeDetailsScreen(),
),
);
},
),
const Divider(
height: 1,
),
const Divider(height: 1),
],
),
);

View File

@@ -3,7 +3,7 @@ import 'package:flutter_svg/svg.dart';
import 'package:intl/intl.dart';
import 'package:kmobile/features/card/screens/card_pin_set_screen.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class CardPinChangeDetailsScreen extends StatefulWidget {
const CardPinChangeDetailsScreen({super.key});

View File

@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class CardPinSetScreen extends StatefulWidget {
const CardPinSetScreen({super.key});

View File

@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:kmobile/features/enquiry/screens/enquiry_screen.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class ChequeManagementScreen extends StatefulWidget {
const ChequeManagementScreen({super.key});
@@ -51,54 +51,42 @@ class _ChequeManagementScreen extends State<ChequeManagementScreen> {
label: AppLocalizations.of(context).requestChequeBook,
onTap: () {},
),
const Divider(
height: 1,
),
const Divider(height: 1),
ChequeManagementTile(
icon: Symbols.data_alert,
label: AppLocalizations.of(context).enquiry,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const EnquiryScreen()));
context,
MaterialPageRoute(builder: (context) => const EnquiryScreen()),
);
},
),
const Divider(
height: 1,
),
const Divider(height: 1),
ChequeManagementTile(
icon: Symbols.approval_delegation,
label: AppLocalizations.of(context).chequeDeposit,
onTap: () {},
),
const Divider(
height: 1,
),
const Divider(height: 1),
ChequeManagementTile(
icon: Symbols.front_hand,
label: AppLocalizations.of(context).stopCheque,
onTap: () {},
),
const Divider(
height: 1,
),
const Divider(height: 1),
ChequeManagementTile(
icon: Symbols.cancel_presentation,
label: AppLocalizations.of(context).revokeStop,
onTap: () {},
),
const Divider(
height: 1,
),
const Divider(height: 1),
ChequeManagementTile(
icon: Symbols.payments,
label: AppLocalizations.of(context).positivePay,
onTap: () {},
),
const Divider(
height: 1,
),
const Divider(height: 1),
],
),
);

View File

@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:kmobile/data/models/user.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class CustomerInfoScreen extends StatefulWidget {
final User user;
@@ -17,96 +17,103 @@ class _CustomerInfoScreenState 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: Text(
AppLocalizations.of(context).kMobile,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
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: 100,
height: 100,
fit: BoxFit.cover,
),
appBar: AppBar(
leading: IconButton(
icon: const Icon(Symbols.arrow_back_ios_new),
onPressed: () {
Navigator.pop(context);
},
),
title: Text(
AppLocalizations.of(context).kMobile,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
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: 100,
height: 100,
fit: BoxFit.cover,
),
),
],
),
body: SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: Padding(
padding: const EdgeInsets.all(16.0),
child: SafeArea(
child: Center(
child: Column(
children: [
const SizedBox(height: 30),
CircleAvatar(
backgroundColor: Colors.grey[200],
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: const TextStyle(
fontSize: 20,
color: Colors.black,
fontWeight: FontWeight.w500),
),
),
Text(
'${AppLocalizations.of(context).cif}: ${user.cifNumber ?? 'N/A'}',
style:
const TextStyle(fontSize: 16, color: Colors.grey),
),
SizedBox(height: 30),
InfoField(
label: AppLocalizations.of(context).activeAccounts,
value: user.activeAccounts?.toString() ?? '6'),
InfoField(
label: AppLocalizations.of(context).mobileNumber,
value: user.mobileNo ?? 'N/A'),
InfoField(
label: AppLocalizations.of(context).dateOfBirth,
value: (user.dateOfBirth != null &&
user.dateOfBirth!.length == 8)
? '${user.dateOfBirth!.substring(0, 2)}-${user.dateOfBirth!.substring(2, 4)}-${user.dateOfBirth!.substring(4, 8)}'
: 'N/A'), // Replace with DOB if available
InfoField(
label: AppLocalizations.of(context).branchCode,
value: user.branchId ?? 'N/A'),
InfoField(
label: AppLocalizations.of(context).branchAddress,
value: user.address ??
'N/A'), // Replace with Aadhar if available
InfoField(
label: AppLocalizations.of(context).primaryId,
value: user.primaryId ??
'N/A'), // Replace with PAN if available
],
),
],
),
body: SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: Padding(
padding: const EdgeInsets.all(16.0),
child: SafeArea(
child: Center(
child: Column(
children: [
const SizedBox(height: 30),
CircleAvatar(
backgroundColor: Colors.grey[200],
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: const TextStyle(
fontSize: 20,
color: Colors.black,
fontWeight: FontWeight.w500,
),
),
),
Text(
'${AppLocalizations.of(context).cif}: ${user.cifNumber ?? 'N/A'}',
style: const TextStyle(fontSize: 16, color: Colors.grey),
),
SizedBox(height: 30),
InfoField(
label: AppLocalizations.of(context).activeAccounts,
value: user.activeAccounts?.toString() ?? '6',
),
InfoField(
label: AppLocalizations.of(context).mobileNumber,
value: user.mobileNo ?? 'N/A',
),
InfoField(
label: AppLocalizations.of(context).dateOfBirth,
value:
(user.dateOfBirth != null &&
user.dateOfBirth!.length == 8)
? '${user.dateOfBirth!.substring(0, 2)}-${user.dateOfBirth!.substring(2, 4)}-${user.dateOfBirth!.substring(4, 8)}'
: 'N/A',
), // Replace with DOB if available
InfoField(
label: AppLocalizations.of(context).branchCode,
value: user.branchId ?? 'N/A',
),
InfoField(
label: AppLocalizations.of(context).branchAddress,
value: user.address ?? 'N/A',
), // Replace with Aadhar if available
InfoField(
label: AppLocalizations.of(context).primaryId,
value: user.primaryId ?? 'N/A',
), // Replace with PAN if available
],
),
)));
),
),
),
),
);
}
}
@@ -135,10 +142,7 @@ class InfoField extends StatelessWidget {
const SizedBox(height: 3),
Text(
value,
style: const TextStyle(
fontSize: 16,
color: Colors.black,
),
style: const TextStyle(fontSize: 16, color: Colors.black),
),
],
),

View File

@@ -20,7 +20,7 @@ import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:shimmer/shimmer.dart';
import 'package:kmobile/data/models/transaction.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class DashboardScreen extends StatefulWidget {
const DashboardScreen({super.key});
@@ -57,11 +57,18 @@ class _DashboardScreenState extends State<DashboardScreen> {
setState(() => _transactions = fiveTxns);
} catch (e) {
log(accountNo, error: e);
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content:
Text(AppLocalizations.of(context).failedToLoad(e.toString()))));
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
AppLocalizations.of(context).failedToLoad(e.toString()),
),
),
);
} finally {
setState(() => _txLoading = false);
if (mounted) {
setState(() => _txLoading = false);
}
}
}
@@ -75,7 +82,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(
/*const*/ SnackBar(
content: Text(AppLocalizations.of(context).failedToRefresh)),
content: Text(AppLocalizations.of(context).failedToRefresh),
),
);
}
setState(() {
@@ -87,11 +95,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
return Shimmer.fromColors(
baseColor: Colors.white.withOpacity(0.7),
highlightColor: Colors.white.withOpacity(0.3),
child: Container(
width: 100,
height: 32,
color: Colors.white,
),
child: Container(width: 100, height: 32, color: Colors.white),
);
}
@@ -106,7 +110,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
'dr.',
'shri',
'smt.',
'kumari'
'kumari',
];
String processed = name.trim().toLowerCase();
for (final title in titles) {
@@ -151,6 +155,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
TextButton(
onPressed: () async {
await storage.write('biometric_prompt_shown', 'true');
if (!mounted) return;
Navigator.of(context).pop();
},
child: Text(AppLocalizations.of(context).later),
@@ -199,8 +204,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
title: Text(
AppLocalizations.of(context).kMobile,
style: TextStyle(
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.w500),
color: Theme.of(context).primaryColor,
fontWeight: FontWeight.w500,
),
),
actions: [
Padding(
@@ -211,7 +217,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const ProfileScreen()),
builder: (context) => const ProfileScreen(),
),
);
},
child: CircleAvatar(
@@ -228,265 +235,334 @@ class _DashboardScreenState extends State<DashboardScreen> {
),
],
),
body: BlocBuilder<AuthCubit, AuthState>(builder: (context, state) {
if (state is AuthLoading || state is AuthInitial) {
return const Center(child: CircularProgressIndicator());
}
if (state is Authenticated) {
final users = state.users;
final currAccount = users[selectedAccountIndex];
// firsttime load
if (!_txInitialized) {
_txInitialized = true;
WidgetsBinding.instance.addPostFrameCallback((_) {
_loadTransactions(currAccount.accountNo!);
});
body: BlocBuilder<AuthCubit, AuthState>(
builder: (context, state) {
if (state is AuthLoading || state is AuthInitial) {
return const Center(child: CircularProgressIndicator());
}
final firstName = getProcessedFirstName(currAccount.name);
if (state is Authenticated) {
final users = state.users;
final currAccount = users[selectedAccountIndex];
// firsttime load
if (!_txInitialized) {
_txInitialized = true;
WidgetsBinding.instance.addPostFrameCallback((_) {
_loadTransactions(currAccount.accountNo!);
});
}
final firstName = getProcessedFirstName(currAccount.name);
return SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Text(
"${AppLocalizations.of(context).hi} $firstName",
style: GoogleFonts.montserrat().copyWith(
return SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Text(
"${AppLocalizations.of(context).hi} $firstName",
style: GoogleFonts.montserrat().copyWith(
fontSize: 25,
color: Theme.of(context).primaryColorDark,
fontWeight: FontWeight.w700),
fontWeight: FontWeight.w700,
),
),
),
),
const SizedBox(height: 16),
const SizedBox(height: 16),
// Account Info Card
Container(
padding: const EdgeInsets.symmetric(
horizontal: 18, vertical: 10),
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(16),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(AppLocalizations.of(context).accountNumber,
style: TextStyle(
color: Colors.white, fontSize: 12)),
DropdownButton<int>(
value: selectedAccountIndex,
dropdownColor: Theme.of(context).primaryColor,
underline: const SizedBox(),
icon: const Icon(Icons.keyboard_arrow_down),
iconEnabledColor: Colors.white,
style: const TextStyle(
color: Colors.white, fontSize: 14),
items: List.generate(users.length, (index) {
return DropdownMenuItem<int>(
value: index,
child: Text(
users[index].accountNo ?? 'N/A',
style: const TextStyle(
color: Colors.white, fontSize: 14),
),
);
}),
onChanged: (int? newIndex) async {
if (newIndex == null ||
newIndex == selectedAccountIndex) {
return;
}
if (isBalanceLoading) return;
if (isVisible) {
setState(() {
isBalanceLoading = true;
selectedAccountIndex = newIndex;
});
await Future.delayed(
const Duration(milliseconds: 200));
setState(() {
isBalanceLoading = false;
});
} else {
setState(() {
selectedAccountIndex = newIndex;
});
}
await _loadTransactions(
users[newIndex].accountNo!);
},
),
const Spacer(),
IconButton(
icon: isRefreshing
? const SizedBox(
width: 20,
height: 20,
child: CircularProgressIndicator(
// Account Info Card
Container(
padding: const EdgeInsets.symmetric(
horizontal: 18,
vertical: 10,
),
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(16),
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
Text(
"${AppLocalizations.of(context).accountNumber}: ",
style: const TextStyle(
color: Colors.white,
fontSize: 12,
),
),
DropdownButton<int>(
value: selectedAccountIndex,
dropdownColor: Theme.of(context).primaryColor,
underline: const SizedBox(),
icon: const Icon(Icons.keyboard_arrow_down),
iconEnabledColor: Colors.white,
style: const TextStyle(
color: Colors.white,
fontSize: 14,
),
items: List.generate(users.length, (index) {
return DropdownMenuItem<int>(
value: index,
child: Text(
users[index].accountNo ?? 'N/A',
style: const TextStyle(
color: Colors.white,
strokeWidth: 2,
fontSize: 14,
),
)
: const Icon(Icons.refresh,
color: Colors.white),
onPressed: isRefreshing
? null
: () => _refreshAccountData(context),
tooltip: 'Refresh',
),
);
}),
onChanged: (int? newIndex) async {
if (newIndex == null ||
newIndex == selectedAccountIndex) {
return;
}
if (isBalanceLoading) return;
if (isVisible) {
setState(() {
isBalanceLoading = true;
selectedAccountIndex = newIndex;
});
await Future.delayed(
const Duration(milliseconds: 200),
);
setState(() {
isBalanceLoading = false;
});
} else {
setState(() {
selectedAccountIndex = newIndex;
});
}
await _loadTransactions(
users[newIndex].accountNo!,
);
},
),
const Spacer(),
IconButton(
icon: isRefreshing
? const SizedBox(
width: 20,
height: 20,
child: CircularProgressIndicator(
color: Colors.white,
strokeWidth: 2,
),
)
: const Icon(
Icons.refresh,
color: Colors.white,
),
onPressed: isRefreshing
? null
: () => _refreshAccountData(context),
tooltip: 'Refresh',
),
],
),
Text(
getFullAccountType(currAccount.accountType),
style: const TextStyle(
color: Colors.white,
fontSize: 16,
),
],
),
Text(
getFullAccountType(currAccount.accountType),
style: const TextStyle(
color: Colors.white, fontSize: 16),
),
const SizedBox(height: 4),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
const Text("",
),
const SizedBox(height: 4),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
const Text(
"",
style: TextStyle(
color: Colors.white,
fontSize: 40,
fontWeight: FontWeight.w700)),
isRefreshing || isBalanceLoading
? _buildBalanceShimmer()
: Text(
isVisible
? currAccount.currentBalance ?? '0.00'
: '********',
style: const TextStyle(
color: Colors.white,
fontSize: 40,
fontWeight: FontWeight.w700,
),
),
isRefreshing || isBalanceLoading
? _buildBalanceShimmer()
: Text(
isVisible
? currAccount.currentBalance ??
'0.00'
: '********',
style: const TextStyle(
color: Colors.white,
fontSize: 40,
fontWeight: FontWeight.w700)),
const Spacer(),
InkWell(
onTap: () async {
if (isBalanceLoading) return;
if (!isVisible) {
setState(() {
isBalanceLoading = true;
});
await Future.delayed(
const Duration(seconds: 1));
setState(() {
isVisible = true;
isBalanceLoading = false;
});
} else {
setState(() {
isVisible = false;
});
}
},
child: Icon(
fontWeight: FontWeight.w700,
),
),
const Spacer(),
InkWell(
onTap: () async {
if (isBalanceLoading) return;
if (!isVisible) {
setState(() {
isBalanceLoading = true;
});
await Future.delayed(
const Duration(seconds: 1),
);
setState(() {
isVisible = true;
isBalanceLoading = false;
});
} else {
setState(() {
isVisible = false;
});
}
},
child: Icon(
isVisible
? Symbols.visibility_lock
: Symbols.visibility,
color: Colors.white),
),
],
color: Colors.white,
),
),
],
),
const SizedBox(height: 15),
],
),
),
const SizedBox(height: 18),
Text(
AppLocalizations.of(context).quickLinks,
style: const TextStyle(fontSize: 17),
),
const SizedBox(height: 16),
// Quick Links
GridView.count(
crossAxisCount: 4,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
children: [
_buildQuickLink(
Symbols.id_card,
AppLocalizations.of(context).customerInfo,
() {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CustomerInfoScreen(
user: users[selectedAccountIndex],
),
),
);
},
),
_buildQuickLink(
Symbols.currency_rupee,
AppLocalizations.of(context).quickPay,
() {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => QuickPayScreen(
debitAccount: currAccount.accountNo!,
),
),
);
},
),
_buildQuickLink(
Symbols.send_money,
AppLocalizations.of(context).fundTransfer,
() {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const FundTransferBeneficiaryScreen(),
),
);
},
disable: true,
),
_buildQuickLink(
Symbols.server_person,
AppLocalizations.of(context).accountInfo,
() {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AccountInfoScreen(
users: users,
selectedIndex: selectedAccountIndex,
),
),
);
},
),
_buildQuickLink(
Symbols.receipt_long,
AppLocalizations.of(context).accountStatement,
() {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AccountStatementScreen(
accountNo:
users[selectedAccountIndex].accountNo!,
),
),
);
},
),
_buildQuickLink(
Symbols.checkbook,
AppLocalizations.of(context).handleCheque,
() {},
disable: true,
),
_buildQuickLink(
Icons.group,
AppLocalizations.of(context).manageBeneficiary,
() {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const ManageBeneficiariesScreen(),
),
);
},
disable: true,
),
_buildQuickLink(
Symbols.support_agent,
AppLocalizations.of(context).contactUs,
() {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const EnquiryScreen(),
),
);
},
),
const SizedBox(height: 15),
],
),
),
const SizedBox(height: 18),
Text(
AppLocalizations.of(context).quickLinks,
style: TextStyle(fontSize: 17),
),
const SizedBox(height: 16),
const SizedBox(height: 5),
// Quick Links
GridView.count(
crossAxisCount: 4,
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
children: [
_buildQuickLink(Symbols.id_card,
AppLocalizations.of(context).customerInfo, () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => CustomerInfoScreen(
user: users[selectedAccountIndex],
)));
}),
_buildQuickLink(Symbols.currency_rupee,
AppLocalizations.of(context).quickPay, () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => QuickPayScreen(
debitAccount: currAccount.accountNo!)));
}),
_buildQuickLink(Symbols.send_money,
AppLocalizations.of(context).fundTransfer, () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const FundTransferBeneficiaryScreen()));
}, disable: false),
_buildQuickLink(Symbols.server_person,
AppLocalizations.of(context).accountInfo, () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AccountInfoScreen(
users: users,
selectedIndex: selectedAccountIndex)));
}),
_buildQuickLink(Symbols.receipt_long,
AppLocalizations.of(context).accountStatement, () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AccountStatementScreen(
accountNo: users[selectedAccountIndex]
.accountNo!,
)));
}),
_buildQuickLink(Symbols.checkbook,
AppLocalizations.of(context).handleCheque, () {},
disable: false),
_buildQuickLink(Icons.group,
AppLocalizations.of(context).manageBeneficiary, () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const ManageBeneficiariesScreen()));
}, disable: false),
_buildQuickLink(Symbols.support_agent,
AppLocalizations.of(context).contactUs, () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const EnquiryScreen()));
}),
],
),
const SizedBox(height: 5),
// Recent Transactions
Text(
AppLocalizations.of(context).recentTransactions,
style: TextStyle(fontSize: 17),
),
const SizedBox(height: 16),
if (_txLoading)
..._buildTransactionShimmer()
else if (_transactions.isNotEmpty)
..._transactions.map((tx) => ListTile(
// Recent Transactions
Text(
AppLocalizations.of(context).recentTransactions,
style: const TextStyle(fontSize: 17),
),
const SizedBox(height: 16),
if (_txLoading)
..._buildTransactionShimmer()
else if (_transactions.isNotEmpty)
..._transactions.map(
(tx) => ListTile(
leading: Icon(
tx.type == 'CR'
? Symbols.call_received
@@ -502,32 +578,39 @@ class _DashboardScreenState extends State<DashboardScreen> {
: '',
style: const TextStyle(fontSize: 14),
),
subtitle: Text(tx.date ?? '',
style: const TextStyle(fontSize: 12)),
trailing: Text("${tx.amount}",
style: const TextStyle(fontSize: 16)),
))
else
Padding(
padding: const EdgeInsets.symmetric(vertical: 24.0),
child: Center(
child: Text(
AppLocalizations.of(context).noTransactions,
style: TextStyle(
fontSize: 16,
color: Colors.grey[600],
subtitle: Text(
tx.date ?? '',
style: const TextStyle(fontSize: 12),
),
trailing: Text(
"${tx.amount}",
style: const TextStyle(fontSize: 16),
),
),
)
else
Padding(
padding: const EdgeInsets.symmetric(vertical: 24.0),
child: Center(
child: Text(
AppLocalizations.of(context).noTransactions,
style: TextStyle(
fontSize: 16,
color: Colors.grey[600],
),
),
),
),
),
],
],
),
),
),
);
}
return Center(
child: Text(AppLocalizations.of(context).somethingWentWrong),
);
}
return Center(
child: Text(AppLocalizations.of(context).somethingWentWrong));
}),
},
),
),
);
}
@@ -554,20 +637,28 @@ class _DashboardScreenState extends State<DashboardScreen> {
});
}
Widget _buildQuickLink(IconData icon, String label, VoidCallback onTap,
{bool disable = false}) {
Widget _buildQuickLink(
IconData icon,
String label,
VoidCallback onTap, {
bool disable = false,
}) {
return InkWell(
onTap: disable ? null : onTap,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(icon,
size: 30,
color: disable ? Colors.grey : Theme.of(context).primaryColor),
Icon(
icon,
size: 30,
color: disable ? Colors.grey : Theme.of(context).primaryColor,
),
const SizedBox(height: 4),
Text(label,
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 13)),
Text(
label,
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 13),
),
],
),
);

View File

@@ -1,14 +1,11 @@
import 'package:flutter/material.dart';
import '../../accounts/models/account.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../../../l10n/app_localizations.dart';
class AccountCard extends StatelessWidget {
final Account account;
const AccountCard({
super.key,
required this.account,
});
const AccountCard({super.key, required this.account});
@override
Widget build(BuildContext context) {
@@ -59,10 +56,7 @@ class AccountCard extends StatelessWidget {
const SizedBox(height: 20),
Text(
account.accountNumber,
style: const TextStyle(
color: Colors.white70,
fontSize: 16,
),
style: const TextStyle(color: Colors.white70, fontSize: 16),
),
const SizedBox(height: 30),
Text(
@@ -76,10 +70,7 @@ class AccountCard extends StatelessWidget {
const SizedBox(height: 5),
Text(
AppLocalizations.of(context).availableBalance,
style: TextStyle(
color: Colors.white70,
fontSize: 12,
),
style: TextStyle(color: Colors.white70, fontSize: 12),
),
],
),

View File

@@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class EnquiryScreen extends StatefulWidget {
const EnquiryScreen({super.key});
@@ -86,10 +86,11 @@ class _EnquiryScreen extends State<EnquiryScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// … existing Mail us / Call us / Write to us …
const SizedBox(height: 20),
Text(AppLocalizations.of(context).writeToUs,
style: TextStyle(color: Colors.grey)),
Text(
AppLocalizations.of(context).writeToUs,
style: TextStyle(color: Colors.grey),
),
const SizedBox(height: 4),
const Text(
"complaint@kccb.in",

View File

@@ -3,7 +3,7 @@ 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 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class FundTransferBeneficiaryScreen extends StatefulWidget {
const FundTransferBeneficiaryScreen({super.key});
@@ -16,22 +16,10 @@ class FundTransferBeneficiaryScreen extends StatefulWidget {
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',
},
{'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
@@ -73,23 +61,24 @@ class _FundTransferBeneficiaryScreen
final beneficiary = beneficiaries[index];
return ListTile(
leading: const CircleAvatar(
backgroundColor: Colors.blue, child: Text('A')),
backgroundColor: Colors.blue,
child: Text('A'),
),
title: Text(beneficiary['name']!),
subtitle: Text(beneficiary['bank']!),
trailing: IconButton(
icon: const Icon(
Symbols.arrow_right,
size: 20,
),
icon: const Icon(Symbols.arrow_right, size: 20),
onPressed: () {
// Delete action
},
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const FundTransferScreen()));
context,
MaterialPageRoute(
builder: (context) => const FundTransferScreen(),
),
);
},
);
},
@@ -100,9 +89,11 @@ class _FundTransferBeneficiaryScreen
child: FloatingActionButton(
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const AddBeneficiaryScreen()));
context,
MaterialPageRoute(
builder: (context) => const AddBeneficiaryScreen(),
),
);
},
backgroundColor: Colors.grey[300],
foregroundColor: Colors.blue[900],

View File

@@ -2,7 +2,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:kmobile/features/fund_transfer/screens/transaction_pin_screen.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class FundTransferScreen extends StatefulWidget {
const FundTransferScreen({super.key});
@@ -45,14 +45,17 @@ class _FundTransferScreen extends State<FundTransferScreen> {
);
} else if (value == 'back') {
return GestureDetector(
onTap: () => onKeyTap(value),
child: const Icon(Symbols.backspace, size: 30));
onTap: () => onKeyTap(value),
child: const Icon(Symbols.backspace, size: 30),
);
} else {
return GestureDetector(
onTap: () => onKeyTap(value),
child: Center(
child: Text(value,
style: const TextStyle(fontSize: 24, color: Colors.black)),
child: Text(
value,
style: const TextStyle(fontSize: 24, color: Colors.black),
),
),
);
}
@@ -109,12 +112,14 @@ class _FundTransferScreen extends State<FundTransferScreen> {
Text(
'0300015678903456',
style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500),
)
),
],
),
const SizedBox(height: 20),
Text(AppLocalizations.of(context).enterAmount,
style: TextStyle(fontSize: 20)),
Text(
AppLocalizations.of(context).enterAmount,
style: TextStyle(fontSize: 20),
),
const SizedBox(height: 20),
Container(
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),

View File

@@ -7,15 +7,12 @@ import 'package:kmobile/data/models/payment_response.dart';
import 'package:lottie/lottie.dart';
import 'package:share_plus/share_plus.dart';
import 'package:path_provider/path_provider.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class PaymentAnimationScreen extends StatefulWidget {
final Future<PaymentResponse> paymentResponse;
const PaymentAnimationScreen({
super.key,
required this.paymentResponse,
});
const PaymentAnimationScreen({super.key, required this.paymentResponse});
@override
State<PaymentAnimationScreen> createState() => _PaymentAnimationScreenState();
@@ -29,22 +26,26 @@ class _PaymentAnimationScreenState extends State<PaymentAnimationScreen> {
RenderRepaintBoundary boundary =
_shareKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
ui.Image image = await boundary.toImage(pixelRatio: 3.0);
ByteData? byteData =
await image.toByteData(format: ui.ImageByteFormat.png);
ByteData? byteData = await image.toByteData(
format: ui.ImageByteFormat.png,
);
Uint8List pngBytes = byteData!.buffer.asUint8List();
final tempDir = await getTemporaryDirectory();
final file = await File('${tempDir.path}/payment_result.png').create();
await file.writeAsBytes(pngBytes);
await Share.shareXFiles([XFile(file.path)],
text: '${AppLocalizations.of(context).paymentResult}');
await Share.shareXFiles([
XFile(file.path),
], text: '${AppLocalizations.of(context).paymentResult}');
} catch (e) {
if (!mounted) return;
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
'${AppLocalizations.of(context).failedToShareScreenshot}: $e')),
content: Text(
'${AppLocalizations.of(context).failedToShareScreenshot}: $e',
),
),
);
}
}
@@ -93,29 +94,33 @@ class _PaymentAnimationScreenState extends State<PaymentAnimationScreen> {
? Column(
children: [
Text(
AppLocalizations.of(context)
.paymentSuccessful,
AppLocalizations.of(
context,
).paymentSuccessful,
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
color: Colors.green),
fontSize: 22,
fontWeight: FontWeight.bold,
color: Colors.green,
),
),
const SizedBox(height: 16),
if (response.amount != null)
Text(
'${AppLocalizations.of(context).amount}: ${response.amount} ${response.currency ?? ''}',
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.w700,
fontFamily: 'Rubik'),
fontSize: 18,
fontWeight: FontWeight.w700,
fontFamily: 'Rubik',
),
),
if (response.creditedAccount != null)
Text(
'${AppLocalizations.of(context).creditedAccount}: ${response.creditedAccount}',
style: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,
fontFamily: 'Rubik'),
fontSize: 18,
fontWeight: FontWeight.w500,
fontFamily: 'Rubik',
),
),
if (response.date != null)
Text(
@@ -129,9 +134,10 @@ class _PaymentAnimationScreenState extends State<PaymentAnimationScreen> {
Text(
AppLocalizations.of(context).paymentFailed,
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
color: Colors.red),
fontSize: 22,
fontWeight: FontWeight.bold,
color: Colors.red,
),
),
const SizedBox(height: 16),
if (response.errorMessage != null)
@@ -161,14 +167,18 @@ class _PaymentAnimationScreenState extends State<PaymentAnimationScreen> {
Icons.share_rounded,
color: Theme.of(context).primaryColor,
),
label: Text(AppLocalizations.of(context).share,
style:
TextStyle(color: Theme.of(context).primaryColor)),
label: Text(
AppLocalizations.of(context).share,
style: TextStyle(color: Theme.of(context).primaryColor),
),
style: ElevatedButton.styleFrom(
backgroundColor:
Theme.of(context).scaffoldBackgroundColor,
backgroundColor: Theme.of(
context,
).scaffoldBackgroundColor,
padding: const EdgeInsets.symmetric(
horizontal: 32, vertical: 12),
horizontal: 32,
vertical: 12,
),
shape: RoundedRectangleBorder(
side: BorderSide(
color: Theme.of(context).primaryColor,
@@ -177,25 +187,31 @@ class _PaymentAnimationScreenState extends State<PaymentAnimationScreen> {
borderRadius: BorderRadius.circular(30),
),
textStyle: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: Colors.black),
fontSize: 18,
fontWeight: FontWeight.w600,
color: Colors.black,
),
),
),
ElevatedButton.icon(
onPressed: () {
Navigator.of(context)
.popUntil((route) => route.isFirst);
Navigator.of(
context,
).popUntil((route) => route.isFirst);
},
label: Text(AppLocalizations.of(context).done),
style: ElevatedButton.styleFrom(
padding: const EdgeInsets.symmetric(
horizontal: 45, vertical: 12),
horizontal: 45,
vertical: 12,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
textStyle: const TextStyle(
fontSize: 18, fontWeight: FontWeight.w600),
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
),
],

View File

@@ -1,4 +1,4 @@
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'package:flutter/material.dart';
import 'package:kmobile/features/fund_transfer/screens/tpin_set_screen.dart';
@@ -12,8 +12,10 @@ class TpinOtpScreen extends StatefulWidget {
class _TpinOtpScreenState extends State<TpinOtpScreen> {
final List<FocusNode> _focusNodes = List.generate(4, (_) => FocusNode());
final List<TextEditingController> _controllers =
List.generate(4, (_) => TextEditingController());
final List<TextEditingController> _controllers = List.generate(
4,
(_) => TextEditingController(),
);
@override
void dispose() {
@@ -42,9 +44,7 @@ class _TpinOtpScreenState extends State<TpinOtpScreen> {
if (_enteredOtp == '0000') {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (_) => TpinSetScreen(),
),
MaterialPageRoute(builder: (_) => TpinSetScreen()),
);
} else {
ScaffoldMessenger.of(context).showSnackBar(
@@ -67,8 +67,11 @@ class _TpinOtpScreenState extends State<TpinOtpScreen> {
child: Column(
// mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.lock_outline,
size: 48, color: theme.colorScheme.primary),
Icon(
Icons.lock_outline,
size: 48,
color: theme.colorScheme.primary,
),
const SizedBox(height: 16),
Text(
AppLocalizations.of(context).otpVerification,
@@ -133,8 +136,10 @@ class _TpinOtpScreenState extends State<TpinOtpScreen> {
),
style: ElevatedButton.styleFrom(
backgroundColor: theme.colorScheme.primary,
padding:
const EdgeInsets.symmetric(vertical: 14, horizontal: 28),
padding: const EdgeInsets.symmetric(
vertical: 14,
horizontal: 28,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
@@ -147,7 +152,8 @@ class _TpinOtpScreenState extends State<TpinOtpScreen> {
// Resend OTP logic here
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(AppLocalizations.of(context).otpResent)),
content: Text(AppLocalizations.of(context).otpResent),
),
);
},
child: Text(AppLocalizations.of(context).resendOtp),

View File

@@ -1,4 +1,4 @@
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'package:flutter/material.dart';
import 'package:kmobile/features/fund_transfer/screens/tpin_otp_screen.dart';
@@ -10,16 +10,17 @@ class TpinSetupPromptScreen extends StatelessWidget {
Widget build(BuildContext context) {
final theme = Theme.of(context);
return Scaffold(
appBar: AppBar(
title: Text(AppLocalizations.of(context).setTpin),
),
appBar: AppBar(title: Text(AppLocalizations.of(context).setTpin)),
body: Padding(
padding: const EdgeInsets.symmetric(vertical: 100.0),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.lock_person_rounded,
size: 60, color: theme.colorScheme.primary),
Icon(
Icons.lock_person_rounded,
size: 60,
color: theme.colorScheme.primary,
),
const SizedBox(height: 18),
Text(
AppLocalizations.of(context).tpinRequired,
@@ -45,8 +46,10 @@ class TpinSetupPromptScreen extends StatelessWidget {
),
style: ElevatedButton.styleFrom(
backgroundColor: theme.colorScheme.primary,
padding:
const EdgeInsets.symmetric(vertical: 14, horizontal: 32),
padding: const EdgeInsets.symmetric(
vertical: 14,
horizontal: 32,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
@@ -54,9 +57,7 @@ class TpinSetupPromptScreen extends StatelessWidget {
onPressed: () {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (_) => const TpinOtpScreen(),
),
MaterialPageRoute(builder: (_) => const TpinOtpScreen()),
);
},
),

View File

@@ -1,4 +1,4 @@
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'package:flutter/material.dart';
import 'package:kmobile/api/services/auth_service.dart';
@@ -66,14 +66,17 @@ class _TpinSetScreenState extends State<TpinSetScreen> {
context: context,
barrierDismissible: false,
builder: (ctx) => AlertDialog(
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(18)),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(18),
),
title: Column(
children: [
Icon(Icons.check_circle, color: Colors.green, size: 60),
SizedBox(height: 12),
Text(AppLocalizations.of(context).success,
style: TextStyle(fontWeight: FontWeight.bold)),
Text(
AppLocalizations.of(context).success,
style: TextStyle(fontWeight: FontWeight.bold),
),
],
),
content: Text(
@@ -85,8 +88,10 @@ class _TpinSetScreenState extends State<TpinSetScreen> {
onPressed: () {
Navigator.of(ctx).pop();
},
child: Text(AppLocalizations.of(context).ok,
style: TextStyle(fontSize: 16)),
child: Text(
AppLocalizations.of(context).ok,
style: TextStyle(fontSize: 16),
),
),
],
),
@@ -125,7 +130,7 @@ class _TpinSetScreenState extends State<TpinSetScreen> {
['1', '2', '3'],
['4', '5', '6'],
['7', '8', '9'],
['Enter', '0', '<']
['Enter', '0', '<'],
];
return Column(
@@ -144,8 +149,9 @@ class _TpinSetScreenState extends State<TpinSetScreen> {
_handleComplete();
} else {
setState(() {
_errorText =
AppLocalizations.of(context).pleaseEnter6Digits;
_errorText = AppLocalizations.of(
context,
).pleaseEnter6Digits;
});
}
} else if (key.isNotEmpty) {
@@ -206,8 +212,10 @@ class _TpinSetScreenState extends State<TpinSetScreen> {
if (_errorText != null)
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(_errorText!,
style: const TextStyle(color: Colors.red)),
child: Text(
_errorText!,
style: const TextStyle(color: Colors.red),
),
),
const Spacer(),
buildNumberPad(),

View File

@@ -1,4 +1,4 @@
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'package:flutter/material.dart';
import 'package:kmobile/api/services/auth_service.dart';
@@ -36,9 +36,7 @@ class _TransactionPinScreen extends State<TransactionPinScreen> {
if (!isSet && mounted) {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (_) => const TpinSetupPromptScreen(),
),
MaterialPageRoute(builder: (_) => const TpinSetupPromptScreen()),
);
} else if (mounted) {
setState(() => _loading = false);
@@ -48,7 +46,8 @@ class _TransactionPinScreen extends State<TransactionPinScreen> {
setState(() => _loading = false);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(AppLocalizations.of(context).tpinStatusFailed)),
content: Text(AppLocalizations.of(context).tpinStatusFailed),
),
);
}
}
@@ -95,8 +94,8 @@ class _TransactionPinScreen extends State<TransactionPinScreen> {
} else {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content:
Text(AppLocalizations.of(context).enter6DigitTpin)),
content: Text(AppLocalizations.of(context).enter6DigitTpin),
),
);
}
} else {
@@ -122,11 +121,13 @@ class _TransactionPinScreen extends State<TransactionPinScreen> {
Row(children: [_buildKey('1'), _buildKey('2'), _buildKey('3')]),
Row(children: [_buildKey('4'), _buildKey('5'), _buildKey('6')]),
Row(children: [_buildKey('7'), _buildKey('8'), _buildKey('9')]),
Row(children: [
_buildKey('done', icon: Icons.check),
_buildKey('0'),
_buildKey('back', icon: Icons.backspace_outlined),
]),
Row(
children: [
_buildKey('done', icon: Icons.check),
_buildKey('0'),
_buildKey('back', icon: Icons.backspace_outlined),
],
),
],
);
}
@@ -136,19 +137,21 @@ class _TransactionPinScreen extends State<TransactionPinScreen> {
final transfer = widget.transactionData;
transfer.tpin = _pin.join();
try {
final paymentResponse =
paymentService.processQuickPayWithinBank(transfer);
final paymentResponse = paymentService.processQuickPayWithinBank(
transfer,
);
Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (_) =>
PaymentAnimationScreen(paymentResponse: paymentResponse)),
builder: (_) =>
PaymentAnimationScreen(paymentResponse: paymentResponse),
),
);
} catch (e) {
if (mounted) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text(e.toString())),
);
ScaffoldMessenger.of(
context,
).showSnackBar(SnackBar(content: Text(e.toString())));
}
}
}

View File

@@ -1,4 +1,4 @@
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'dart:io';
import 'dart:typed_data';
@@ -35,8 +35,9 @@ class _TransactionSuccessScreen extends State<TransactionSuccessScreen> {
@override
Widget build(BuildContext context) {
final String transactionDate =
DateTime.now().toLocal().toString().split(' ')[0];
final String transactionDate = DateTime.now().toLocal().toString().split(
' ',
)[0];
final String creditAccount = widget.creditAccount;
return Scaffold(
@@ -52,37 +53,24 @@ class _TransactionSuccessScreen extends State<TransactionSuccessScreen> {
const CircleAvatar(
radius: 50,
backgroundColor: Colors.blue,
child: Icon(
Icons.check,
color: Colors.white,
size: 60,
),
child: Icon(Icons.check, color: Colors.white, size: 60),
),
const SizedBox(height: 24),
Text(
AppLocalizations.of(context).transactionSuccess,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
),
style: TextStyle(fontSize: 18, fontWeight: FontWeight.w600),
textAlign: TextAlign.center,
),
const SizedBox(height: 6),
Text(
"On $transactionDate",
style: const TextStyle(
fontSize: 14,
color: Colors.black54,
),
style: const TextStyle(fontSize: 14, color: Colors.black54),
textAlign: TextAlign.center,
),
const SizedBox(height: 16),
Text(
"${AppLocalizations.of(context).toAccountNumber}: $creditAccount",
style: const TextStyle(
fontSize: 12,
color: Colors.black87,
),
style: const TextStyle(fontSize: 12, color: Colors.black87),
textAlign: TextAlign.center,
),
],
@@ -102,13 +90,13 @@ class _TransactionSuccessScreen extends State<TransactionSuccessScreen> {
icon: const Icon(Icons.share, size: 18),
label: Text(AppLocalizations.of(context).share),
style: ElevatedButton.styleFrom(
shape: const StadiumBorder(),
padding: const EdgeInsets.symmetric(vertical: 16),
backgroundColor: Colors.white,
foregroundColor: Colors.blueAccent,
side:
const BorderSide(color: Colors.black, width: 1),
elevation: 0),
shape: const StadiumBorder(),
padding: const EdgeInsets.symmetric(vertical: 16),
backgroundColor: Colors.white,
foregroundColor: Colors.blueAccent,
side: const BorderSide(color: Colors.black, width: 1),
elevation: 0,
),
),
),
const SizedBox(width: 12),
@@ -117,10 +105,11 @@ class _TransactionSuccessScreen extends State<TransactionSuccessScreen> {
onPressed: () {
// Done action
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
const NavigationScaffold()));
context,
MaterialPageRoute(
builder: (context) => const NavigationScaffold(),
),
);
},
style: ElevatedButton.styleFrom(
shape: const StadiumBorder(),

View File

@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'package:kmobile/app.dart';
class LanguageDialog extends StatelessWidget {
@@ -19,10 +19,7 @@ class LanguageDialog extends StatelessWidget {
builder: (context) {
final localizations = AppLocalizations.of(context);
final supportedLocales = [
const Locale('en'),
const Locale('hi'),
];
final supportedLocales = [const Locale('en'), const Locale('hi')];
return AlertDialog(
title: Text(localizations.language),

View File

@@ -1,6 +1,6 @@
import 'package:flutter/material.dart';
import 'language_dialog.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class PreferenceScreen extends StatelessWidget {
const PreferenceScreen({super.key});

View File

@@ -1,5 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../l10n/app_localizations.dart';
import 'package:kmobile/features/profile/preferences/preference_screen.dart';
class ProfileScreen extends StatelessWidget {
@@ -21,9 +21,7 @@ class ProfileScreen extends StatelessWidget {
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => const PreferenceScreen(),
),
MaterialPageRoute(builder: (_) => const PreferenceScreen()),
);
},
),

View File

@@ -1,4 +1,4 @@
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
@@ -109,8 +109,10 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
Text(
widget.debitAccount,
style: const TextStyle(
fontSize: 18, fontWeight: FontWeight.w500),
)
fontSize: 18,
fontWeight: FontWeight.w500,
),
),
],
),
const SizedBox(height: 20),
@@ -247,29 +249,30 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
Row(
children: [
Expanded(
child: TextFormField(
decoration: InputDecoration(
labelText: AppLocalizations.of(context).ifscCode,
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),
child: TextFormField(
decoration: InputDecoration(
labelText: AppLocalizations.of(context).ifscCode,
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),
),
),
controller: ifscController,
textInputAction: TextInputAction.next,
validator: (value) {
if (value == null || value.isEmpty) {
return AppLocalizations.of(context).ifscRequired;
}
return null;
},
),
controller: ifscController,
textInputAction: TextInputAction.next,
validator: (value) {
if (value == null || value.isEmpty) {
return AppLocalizations.of(context).ifscRequired;
}
return null;
},
)),
),
const SizedBox(width: 10),
Expanded(
child: DropdownButtonFormField<String>(
@@ -287,15 +290,16 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
borderSide: BorderSide(color: Colors.black, width: 2),
),
),
items: [
AppLocalizations.of(context).savings,
AppLocalizations.of(context).current
]
.map((e) => DropdownMenuItem(
value: e,
child: Text(e),
))
.toList(),
items:
[
AppLocalizations.of(context).savings,
AppLocalizations.of(context).current,
]
.map(
(e) =>
DropdownMenuItem(value: e, child: Text(e)),
)
.toList(),
onChanged: (value) => setState(() {
accountType = value!;
}),
@@ -366,50 +370,52 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
const SizedBox(height: 30),
Row(
children: [
Text(AppLocalizations.of(context).transactionMode,
style: TextStyle(fontWeight: FontWeight.w500)),
Text(
AppLocalizations.of(context).transactionMode,
style: TextStyle(fontWeight: FontWeight.w500),
),
const SizedBox(width: 12),
Expanded(child: buildTransactionModeSelector()),
],
),
const SizedBox(height: 45),
Align(
alignment: Alignment.center,
child: SwipeButton.expand(
thumb: const Icon(
Icons.arrow_forward,
color: Colors.white,
),
activeThumbColor: Colors.blue[900],
activeTrackColor: Colors.blue.shade100,
borderRadius: BorderRadius.circular(30),
height: 56,
child: Text(
AppLocalizations.of(context).swipeToPay,
style:
TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
onSwipe: () {
if (_formKey.currentState!.validate()) {
// Perform payment logic
final selectedMode =
transactionModes(context)[selectedTransactionIndex];
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
'${AppLocalizations.of(context).payingVia} $selectedMode...')),
);
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// const TransactionPinScreen(
// transactionData: {},
// transactionCode: 'PAYMENT',
// )));
}
},
)),
alignment: Alignment.center,
child: SwipeButton.expand(
thumb: const Icon(Icons.arrow_forward, color: Colors.white),
activeThumbColor: Colors.blue[900],
activeTrackColor: Colors.blue.shade100,
borderRadius: BorderRadius.circular(30),
height: 56,
child: Text(
AppLocalizations.of(context).swipeToPay,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
),
onSwipe: () {
if (_formKey.currentState!.validate()) {
// Perform payment logic
final selectedMode = transactionModes(
context,
)[selectedTransactionIndex];
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
'${AppLocalizations.of(context).payingVia} $selectedMode...',
),
),
);
// Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) =>
// const TransactionPinScreen(
// transactionData: {},
// transactionCode: 'PAYMENT',
// )));
}
},
),
),
],
),
),
@@ -442,9 +448,7 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
alignment: Alignment.center,
child: Text(
transactionModes(context)[index],
style: const TextStyle(
color: Colors.black,
),
style: const TextStyle(color: Colors.black),
),
),
),

View File

@@ -3,7 +3,7 @@ import 'package:flutter_svg/svg.dart';
import 'package:kmobile/features/quick_pay/screens/quick_pay_outside_bank_screen.dart';
import 'package:kmobile/features/quick_pay/screens/quick_pay_within_bank_screen.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
class QuickPayScreen extends StatefulWidget {
final String debitAccount;
@@ -25,8 +25,9 @@ class _QuickPayScreen extends State<QuickPayScreen> {
},
),
title: Text(
AppLocalizations.of(context).quickPay,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
AppLocalizations.of(context).quickPay.replaceAll('\n', ' '),
style:
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
centerTitle: false,
actions: [
@@ -52,30 +53,32 @@ class _QuickPayScreen extends State<QuickPayScreen> {
label: AppLocalizations.of(context).ownBank,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => QuickPayWithinBankScreen(
debitAccount: widget.debitAccount)));
context,
MaterialPageRoute(
builder: (context) => QuickPayWithinBankScreen(
debitAccount: widget.debitAccount,
),
),
);
},
),
const Divider(
height: 1,
),
const Divider(height: 1),
QuickPayManagementTile(
//disable: true,
disable: true,
icon: Symbols.output_circle,
label: AppLocalizations.of(context).outsideBank,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => QuickPayOutsideBankScreen(
debitAccount: widget.debitAccount)));
context,
MaterialPageRoute(
builder: (context) => QuickPayOutsideBankScreen(
debitAccount: widget.debitAccount,
),
),
);
},
),
const Divider(
height: 1,
),
const Divider(height: 1),
],
),
);

View File

@@ -1,9 +1,11 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:flutter_swipe_button/flutter_swipe_button.dart';
import 'package:kmobile/api/services/beneficiary_service.dart';
import 'package:kmobile/data/models/transfer.dart';
import 'package:kmobile/di/injection.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import '../../fund_transfer/screens/transaction_pin_screen.dart';
class QuickPayWithinBankScreen extends StatefulWidget {
@@ -23,6 +25,64 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
final TextEditingController amountController = TextEditingController();
String? _selectedAccountType;
String? _beneficiaryName;
bool _isValidating = false;
bool _isBeneficiaryValidated = false;
String? _validationError;
@override
void initState() {
super.initState();
accountNumberController.addListener(_resetBeneficiaryValidation);
confirmAccountNumberController.addListener(_resetBeneficiaryValidation);
}
void _resetBeneficiaryValidation() {
if (_isBeneficiaryValidated ||
_beneficiaryName != null ||
_validationError != null) {
setState(() {
_isBeneficiaryValidated = false;
_beneficiaryName = null;
_validationError = null;
});
}
}
@override
void dispose() {
accountNumberController.removeListener(_resetBeneficiaryValidation);
confirmAccountNumberController.removeListener(_resetBeneficiaryValidation);
accountNumberController.dispose();
confirmAccountNumberController.dispose();
amountController.dispose();
super.dispose();
}
Future<void> _validateBeneficiary() async {
var beneficiaryService = getIt<BeneficiaryService>();
setState(() {
_isValidating = true;
_validationError = null;
});
try {
final name = await beneficiaryService
.validateBeneficiaryWithinBank(accountNumberController.text);
setState(() {
_beneficiaryName = name;
_isBeneficiaryValidated = true;
_isValidating = false;
});
} catch (e) {
setState(() {
_validationError = "Account Number not from KCCB";
_isValidating = false;
_isBeneficiaryValidated = false;
_beneficiaryName = null;
});
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
@@ -35,7 +95,8 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
),
title: Text(
AppLocalizations.of(context).quickPayOwnBank,
style: TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
style:
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
),
centerTitle: false,
actions: [
@@ -64,7 +125,7 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
TextFormField(
decoration: InputDecoration(
labelText: AppLocalizations.of(context).debitAccountNumber,
border: OutlineInputBorder(),
border: const OutlineInputBorder(),
isDense: true,
filled: true,
fillColor: Colors.white,
@@ -79,14 +140,14 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
TextFormField(
decoration: InputDecoration(
labelText: AppLocalizations.of(context).accountNumber,
border: OutlineInputBorder(),
border: const OutlineInputBorder(),
isDense: true,
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide(color: Colors.black, width: 2),
),
),
@@ -118,14 +179,14 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
decoration: InputDecoration(
labelText: AppLocalizations.of(context).confirmAccountNumber,
// prefixIcon: Icon(Icons.person),
border: OutlineInputBorder(),
border: const OutlineInputBorder(),
isDense: true,
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide(color: Colors.black, width: 2),
),
),
@@ -141,19 +202,73 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
return null;
},
),
if (!_isBeneficiaryValidated)
Padding(
padding: const EdgeInsets.only(top: 12.0),
child: SizedBox(
width: double.infinity,
child: ElevatedButton(
onPressed: _isValidating
? null
: () {
if (accountNumberController.text.length == 11 &&
confirmAccountNumberController.text ==
accountNumberController.text) {
_validateBeneficiary();
} else {
setState(() {
_validationError =
'Please enter a valid and matching account number.';
});
}
},
child: _isValidating
? const SizedBox(
width: 20,
height: 20,
child: CircularProgressIndicator(strokeWidth: 2),
)
: const Text('Validate Beneficiary'),
),
),
),
if (_beneficiaryName != null && _isBeneficiaryValidated)
Padding(
padding: const EdgeInsets.only(top: 12.0),
child: Row(
children: [
const Icon(Icons.check_circle, color: Colors.green),
const SizedBox(width: 8),
Text(
'Beneficiary: $_beneficiaryName',
style: const TextStyle(
color: Colors.green, fontWeight: FontWeight.bold),
),
],
),
),
if (_validationError != null)
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
_validationError!,
style: const TextStyle(color: Colors.red),
),
),
const SizedBox(height: 24),
DropdownButtonFormField<String>(
decoration: InputDecoration(
labelText:
AppLocalizations.of(context).beneficiaryAccountType,
border: OutlineInputBorder(),
labelText: AppLocalizations.of(
context,
).beneficiaryAccountType,
border: const OutlineInputBorder(),
isDense: true,
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide(color: Colors.black, width: 2),
),
),
@@ -193,14 +308,14 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
TextFormField(
decoration: InputDecoration(
labelText: AppLocalizations.of(context).amount,
border: OutlineInputBorder(),
border: const OutlineInputBorder(),
isDense: true,
filled: true,
fillColor: Colors.white,
enabledBorder: OutlineInputBorder(
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide(color: Colors.black),
),
focusedBorder: OutlineInputBorder(
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide(color: Colors.black, width: 2),
),
),
@@ -222,33 +337,40 @@ class _QuickPayWithinBankScreen extends State<QuickPayWithinBankScreen> {
Align(
alignment: Alignment.center,
child: SwipeButton.expand(
thumb: const Icon(
Icons.arrow_forward,
color: Colors.white,
),
thumb: const Icon(Icons.arrow_forward, color: Colors.white),
activeThumbColor: Theme.of(context).primaryColor,
activeTrackColor:
Theme.of(context).colorScheme.secondary.withAlpha(100),
activeTrackColor: Theme.of(
context,
).colorScheme.secondary.withAlpha(100),
borderRadius: BorderRadius.circular(30),
height: 56,
child: Text(
AppLocalizations.of(context).swipeToPay,
style: TextStyle(fontSize: 16),
style: const TextStyle(fontSize: 16),
),
onSwipe: () {
if (_formKey.currentState!.validate()) {
if (!_isBeneficiaryValidated) {
setState(() {
_validationError =
'Please validate beneficiary before proceeding.';
});
return;
}
// Perform payment logic
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => TransactionPinScreen(
transactionData: Transfer(
fromAccount: widget.debitAccount,
toAccount: accountNumberController.text,
toAccountType: _selectedAccountType!,
amount: amountController.text,
),
)));
context,
MaterialPageRoute(
builder: (context) => TransactionPinScreen(
transactionData: Transfer(
fromAccount: widget.debitAccount,
toAccount: accountNumberController.text,
toAccountType: _selectedAccountType!,
amount: amountController.text,
),
),
),
);
}
},
),

View File

@@ -1,4 +1,4 @@
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import '../../../l10n/app_localizations.dart';
import 'package:flutter/material.dart';
import 'package:material_symbols_icons/material_symbols_icons.dart';
@@ -38,7 +38,8 @@ class _ServiceScreen extends State<ServiceScreen> {
},
child: const CircleAvatar(
backgroundImage: AssetImage(
'assets/images/avatar.jpg'), // Replace with your image
'assets/images/avatar.jpg',
), // Replace with your image
radius: 20,
),
),
@@ -52,33 +53,25 @@ class _ServiceScreen extends State<ServiceScreen> {
label: AppLocalizations.of(context).accountOpeningDeposit,
onTap: () {},
),
const Divider(
height: 1,
),
const Divider(height: 1),
ServiceManagementTile(
icon: Symbols.add,
label: AppLocalizations.of(context).accountOpeningLoan,
onTap: () {},
),
const Divider(
height: 1,
),
const Divider(height: 1),
ServiceManagementTile(
icon: Symbols.captive_portal,
label: AppLocalizations.of(context).quickLinks,
onTap: () {},
),
const Divider(
height: 1,
),
const Divider(height: 1),
ServiceManagementTile(
icon: Symbols.missing_controller,
label: AppLocalizations.of(context).branchLocator,
onTap: () {},
),
const Divider(
height: 1,
)
const Divider(height: 1),
],
),
);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,641 @@
// ignore: unused_import
import 'package:intl/intl.dart' as intl;
import 'app_localizations.dart';
// ignore_for_file: type=lint
/// The translations for English (`en`).
class AppLocalizationsEn extends AppLocalizations {
AppLocalizationsEn([String locale = 'en']) : super(locale);
@override
String get profile => 'Profile';
@override
String get preferences => 'Preferences';
@override
String get language => 'Language';
@override
String get selectLanguage => 'Select Language';
@override
String get english => 'English';
@override
String get hindi => 'Hindi';
@override
String get cancel => 'Cancel';
@override
String get home => 'Home';
@override
String get card => 'Card';
@override
String get services => 'Services';
@override
String get quickPay => 'Quick \n Pay';
@override
String get quickLinks => 'Quick Links';
@override
String get recentTransactions => 'Recent Transactions';
@override
String get accountNumber => 'Account Number';
@override
String get enableBiometric => 'Enable Biometric Authentication';
@override
String get useBiometricPrompt => 'Use fingerprint/face ID for faster login?';
@override
String get later => 'Later';
@override
String get enable => 'Enable';
@override
String get noTransactions => 'No transactions found for this account.';
@override
String get somethingWentWrong => 'Something went wrong';
@override
String failedToLoad(Object error) {
return 'Failed to load transactions: $error';
}
@override
String get failedToRefresh => 'Failed to refresh data';
@override
String get hi => 'Hi';
@override
String get kMobile => 'kMobile';
@override
String get scanBiometric => 'Scan to enable Biometric login';
@override
String get savingsAccount => 'Savings Account';
@override
String get loanAccount => 'Loan Account';
@override
String get termDeposit => 'Term Deposit Account';
@override
String get recurringDeposit => 'Recurring Deposit Account';
@override
String get unknownAccount => 'Unknown Account Type';
@override
String get customerInfo => 'Customer \n Info';
@override
String get fundTransfer => 'Fund Transfer';
@override
String get accountInfo => 'Account Info';
@override
String get accountStatement => 'Account Statement';
@override
String get handleCheque => 'Handle \n Cheque';
@override
String get manageBeneficiary => 'Manage \n Beneficiary';
@override
String get contactUs => 'Contact \n Us';
@override
String get addBeneficiary => 'Add Beneficiary';
@override
String get confirmAccountNumber => 'Confirm Account Number';
@override
String get name => 'Name';
@override
String get ifscCode => 'IFSC Code';
@override
String get bankName => 'Beneficiary Bank Name';
@override
String get branchName => 'Branch Name';
@override
String get accountType => 'Account Type';
@override
String get savings => 'Savings';
@override
String get current => 'Current';
@override
String get phone => 'Phone';
@override
String get validateAndAdd => 'Validate and Add';
@override
String get beneficiaryAdded => 'Beneficiary Added Successfully';
@override
String get invalidIfscFormat => 'Invalid IFSC Format';
@override
String get noIfscDetails => 'No details found for IFSC';
@override
String get enterValidAccountNumber => 'Enter a valid account number';
@override
String get reenterAccountNumber => 'Re-enter Account Number';
@override
String get accountMismatch => 'Account Numbers do not match';
@override
String get nameRequired => 'Name is required';
@override
String get enterIfsc => 'Enter IFSC code';
@override
String get enterValidPhone => 'Enter a valid phone number';
@override
String get payNow => 'Pay Now';
@override
String get beneficiaries => 'Beneficiaries';
@override
String get cif => 'CIF';
@override
String get activeAccounts => 'Number of Active Accounts';
@override
String get mobileNumber => 'Mobile Number';
@override
String get dateOfBirth => 'Date of Birth';
@override
String get branchCode => 'Branch Code';
@override
String get branchAddress => 'Branch Address';
@override
String get primaryId => 'Primary ID';
@override
String get quickPayOwnBank => 'Quick Pay - Own Bank';
@override
String get debitAccountNumber => 'Debit Account Number';
@override
String get accountNumberRequired => 'Account Number is required';
@override
String get validAccountNumber => 'Enter a valid account number';
@override
String get beneficiaryAccountType => 'Beneficiary Account Type';
@override
String get loan => 'Loan';
@override
String get selectAccountType => 'Please select account type';
@override
String get amount => 'Amount';
@override
String get amountRequired => 'Amount is required';
@override
String get validAmount => 'Enter a valid amount';
@override
String get swipeToPay => 'Swipe to Pay';
@override
String get outsideBank => 'Outside Bank';
@override
String get ownBank => 'Own Bank';
@override
String get neft => 'NEFT';
@override
String get rtgs => 'RTGS';
@override
String get imps => 'IMPS';
@override
String get quickPayOutsideBank => 'Quick Pay - Outside Bank';
@override
String get debitFrom => 'Debit from';
@override
String get bankNameRequired => 'Beneficiary Bank name is required';
@override
String get branchNameRequired => 'Beneficiary Branch Name is required';
@override
String get ifscRequired => 'IFSC Code is required';
@override
String get phoneRequired => 'Phone number is required';
@override
String get transactionMode => 'Transaction Mode';
@override
String get payingVia => 'Paying via';
@override
String get accountOpeningDeposit => 'Account Opening Request - Deposit';
@override
String get accountOpeningLoan => 'Account Opening Request - Loan';
@override
String get branchLocator => 'Branch Locator';
@override
String get emailLaunchError => 'Could not launch email client for';
@override
String get dialerLaunchError => 'Could not launch dialer for';
@override
String get writeToUs => 'Write to us';
@override
String get keyContacts => 'Key Contacts';
@override
String get chairman => 'Chairman';
@override
String get managingDirector => 'Managing Director';
@override
String get gmWest => 'General Manager (West)';
@override
String get gmNorth => 'General Manager (North)';
@override
String get enquiry => 'Enquiry';
@override
String get fundTransferBeneficiary => 'Fund Transfer - Beneficiary';
@override
String get enterAmount => 'Enter Amount';
@override
String get customerNumber => 'Customer Number';
@override
String get productName => 'Product Name';
@override
String get accountStatus => 'Account Status';
@override
String get availableBalance => 'Available Balance';
@override
String get currentBalance => 'Current Balance';
@override
String get filters => 'Filters';
@override
String get fromDate => 'From Date';
@override
String get toDate => 'To Date';
@override
String get minAmount => 'Min Amount';
@override
String get maxAmount => 'Max amount';
@override
String get lastTenTransactions => 'Showing last 10 transactions';
@override
String get applyDebitCard => 'Apply Debit Card';
@override
String get blockUnblockCard => 'Block / Unblock Card';
@override
String get changeCardPin => 'Change Card PIN';
@override
String get cardNumber => 'Card Number';
@override
String get cvv => 'CVV';
@override
String get expiryDate => 'Expiry Date';
@override
String get next => 'Next';
@override
String get block => 'Block';
@override
String get approvedAmount => 'Approved Amount';
@override
String get failedToLoadTransactions => 'Failed to load transactions';
@override
String get pleaseSelectDateFirst => 'Please select date first';
@override
String get cardBlocked => 'Card has been blocked';
@override
String get blockCard => 'Block Card';
@override
String get enterValidCardNumber => 'Enter valid card number';
@override
String get cvv3Digits => 'CVV must be 3 digits';
@override
String get selectExpiryDate => 'Select expiry date';
@override
String get cardManagement => 'Card Management';
@override
String get paymentResult => 'Payment Result';
@override
String get failedToShareScreenshot => 'Failed to share screenshot';
@override
String get paymentSuccessful => 'Payment successful';
@override
String get cardDetails => 'Card Details';
@override
String get cardPin => 'Card PIN';
@override
String get amountEntered => 'Amount entered';
@override
String get enterNewPin => 'Enter new PIN';
@override
String get pleaseEnterNewPin => 'Please enter new PIN';
@override
String get pin4Digits => 'PIN must be at least 4 digits';
@override
String get enterAgain => 'Enter Again';
@override
String get pinsDoNotMatch => 'PINs do not match. Try again.';
@override
String get submit => 'Submit';
@override
String get chequeManagement => 'Cheque Management';
@override
String get requestChequeBook => 'Request Chequebook';
@override
String get chequeDeposit => 'Cheque Deposit';
@override
String get stopCheque => 'Stop Cheque';
@override
String get revokeStop => 'Revoke Stop';
@override
String get positivePay => 'Positive Pay';
@override
String get pinSetSuccess => 'PIN set successfully';
@override
String get creditedAccount => 'Credited Account';
@override
String get date => 'Date';
@override
String get paymentFailed => 'Payment Failed';
@override
String get share => 'Share';
@override
String get done => 'Done';
@override
String get invalidOtp => 'Invalid OTP';
@override
String get enterOtp => 'Enter OTP';
@override
String get otpVerification => 'OTP Verification';
@override
String get otpSentMessage =>
'Enter the 4-digit OTP sent to your mobile number';
@override
String get verifyOtp => 'Verify OTP';
@override
String get otpResent => 'OTP Resent';
@override
String get resendOtp => 'Resend OTP';
@override
String get setTpin => 'Set TPIN';
@override
String get tpinRequired => 'TPIN Required';
@override
String get tpinRequiredMessage =>
'You need to set your TPIN to continue with secure transactions';
@override
String get setTpinTitle => 'Set TPIN';
@override
String get tpinInfo =>
'Your TPIN is a 6-digit code used to authorize transactions. Keep it safe and do not share it with anyone.';
@override
String get tpinFailed => 'Failed to set TPIN. Please try again.';
@override
String get success => 'Success!';
@override
String get tpinSetSuccess => 'Your TPIN was set successfully';
@override
String get ok => 'OK';
@override
String get pinsMismatchRetry => 'PINs do not match. Try again.';
@override
String get pleaseEnter6Digits => 'Please enter 6 digits';
@override
String get setNewTpin => 'Set your new TPIN';
@override
String get confirmNewTpin => 'Confirm your new TPIN';
@override
String get tpinStatusFailed => 'Failed to check TPIN status';
@override
String get enter6DigitTpin => 'Please enter a 6-digit TPIN';
@override
String get tpin => 'TPIN';
@override
String get enterTpin => 'Enter your TPIN';
@override
String get transactionSuccess => 'Transaction Successful';
@override
String get on => 'On';
@override
String get toAccountNumber => 'To Account Number';
@override
String get shareText => 'Share';
@override
String get enableFingerprintLogin => 'Enable Fingerprint Login?';
@override
String get enableFingerprintMessage =>
'Would you like to enable fingerprint authentication for faster login?';
@override
String get no => 'No';
@override
String get yes => 'Yes';
@override
String get authenticateToEnable => 'Authenticate to enable fingerprint login';
@override
String get exitApp => 'Exit App';
@override
String get exitConfirmation => 'Do you really want to exit?';
@override
String get loading => 'Loading......';
@override
String get enableFingerprintQuick =>
'Enable fingerprint authentication for quick login?';
@override
String get kccb => 'KCCB';
@override
String get password => 'Password';
@override
String get pleaseEnterUsername => 'Please enter your username';
@override
String get pleaseEnterPassword => 'Please enter your password';
@override
String get login => 'Login';
@override
String get or => 'OR';
@override
String get register => 'Register';
@override
String get authenticateToAccess => 'Authenticate to access kmobile';
@override
String get incorrectMPIN => 'Incorrect mPIN. Try again.';
@override
String get pleaseEnter4Digits => 'Please enter 4 digits.';
@override
String get enterMPIN => 'Enter your mPIN';
@override
String get setMPIN => 'Set your mPIN';
@override
String get confirmMPIN => 'Confirm your mPIN';
@override
String get kconnect => 'Kconnect';
@override
String get kccBankFull => 'Kangra Central Co-operative Bank';
}

View File

@@ -0,0 +1,643 @@
// ignore: unused_import
import 'package:intl/intl.dart' as intl;
import 'app_localizations.dart';
// ignore_for_file: type=lint
/// The translations for Hindi (`hi`).
class AppLocalizationsHi extends AppLocalizations {
AppLocalizationsHi([String locale = 'hi']) : super(locale);
@override
String get profile => 'प्रोफ़ाइल';
@override
String get preferences => 'वरीयताएँ';
@override
String get language => 'भाषा';
@override
String get selectLanguage => 'भाषा चुनिए';
@override
String get english => 'अंग्रेज़ी';
@override
String get hindi => 'हिंदी';
@override
String get cancel => 'रद्द करें';
@override
String get home => 'होम';
@override
String get card => 'कार्ड';
@override
String get services => 'सेवाएं';
@override
String get quickPay => 'क्विक \n पे';
@override
String get quickLinks => 'त्वरित लिंक';
@override
String get recentTransactions => 'हाल की लेनदेन';
@override
String get accountNumber => 'खाता संख्या';
@override
String get enableBiometric => 'बायोमेट्रिक प्रमाणीकरण सक्षम करें';
@override
String get useBiometricPrompt =>
'तेज़ लॉगिन के लिए फिंगरप्रिंट/फेस आईडी का उपयोग करें?';
@override
String get later => 'बाद में';
@override
String get enable => 'सक्षम करें';
@override
String get noTransactions => 'इस खाते के लिए कोई लेनदेन नहीं मिला।';
@override
String get somethingWentWrong => 'कुछ गलत हो गया';
@override
String failedToLoad(Object error) {
return 'लेनदेन लोड करने में विफल: $error';
}
@override
String get failedToRefresh => 'डेटा रिफ्रेश करने में विफल';
@override
String get hi => 'नमस्ते';
@override
String get kMobile => 'के मोबाइल';
@override
String get scanBiometric => 'बायोमेट्रिक लॉगिन सक्षम करने के लिए स्कैन करें';
@override
String get savingsAccount => 'बचत खाता';
@override
String get loanAccount => 'ऋण खाता';
@override
String get termDeposit => 'मियादी जमा खाता';
@override
String get recurringDeposit => 'आवर्ती जमा खाता';
@override
String get unknownAccount => 'अज्ञात खाता प्रकार';
@override
String get customerInfo => 'ग्राहक \n जानकारी';
@override
String get fundTransfer => 'फंड ट्रांसफर';
@override
String get accountInfo => 'खाता जानकारी';
@override
String get accountStatement => 'खाता विवरण';
@override
String get handleCheque => 'चेक \n संभालें';
@override
String get manageBeneficiary => 'लाभार्थी \n प्रबंधन';
@override
String get contactUs => 'संपर्क \n करें';
@override
String get addBeneficiary => 'लाभार्थी जोड़ें';
@override
String get confirmAccountNumber => 'खाता संख्या की पुष्टि करें';
@override
String get name => 'नाम';
@override
String get ifscCode => 'आईएफ़एससी कोड';
@override
String get bankName => 'लाभार्थी बैंक का नाम';
@override
String get branchName => 'शाखा का नाम';
@override
String get accountType => 'खाते प्रकार';
@override
String get savings => 'बचत';
@override
String get current => 'चालू';
@override
String get phone => 'फ़ोन';
@override
String get validateAndAdd => 'सत्यापित करें और जोड़ें';
@override
String get beneficiaryAdded => 'लाभार्थी सफलतापूर्वक जोड़ा गया';
@override
String get invalidIfscFormat => 'अमान्य IFSC प्रारूप';
@override
String get noIfscDetails => 'इस IFSC के लिए कोई विवरण नहीं मिला';
@override
String get enterValidAccountNumber => 'कृपया एक मान्य खाता संख्या दर्ज करें';
@override
String get reenterAccountNumber => 'फिर से खाता संख्या दर्ज करें';
@override
String get accountMismatch => 'खाता संख्याएँ मेल नहीं खा रही हैं';
@override
String get nameRequired => 'नाम आवश्यक है';
@override
String get enterIfsc => 'IFSC कोड दर्ज करें';
@override
String get enterValidPhone => 'कृपया एक मान्य फोन नंबर दर्ज करें';
@override
String get payNow => 'अब भुगतान करें';
@override
String get beneficiaries => 'लाभार्थी';
@override
String get cif => 'सीआईएफ';
@override
String get activeAccounts => 'सक्रिय खातों की संख्या';
@override
String get mobileNumber => 'मोबाइल नंबर';
@override
String get dateOfBirth => 'जन्म तिथि';
@override
String get branchCode => 'शाखा कोड';
@override
String get branchAddress => 'शाखा पता';
@override
String get primaryId => 'प्राथमिक पहचान';
@override
String get quickPayOwnBank => 'क्विक पे - स्वयं का बैंक';
@override
String get debitAccountNumber => 'डेबिट खाता संख्या';
@override
String get accountNumberRequired => 'खाता संख्या आवश्यक है';
@override
String get validAccountNumber => 'एक मान्य खाता संख्या दर्ज करें';
@override
String get beneficiaryAccountType => 'लाभार्थी खाता प्रकार';
@override
String get loan => 'ऋण';
@override
String get selectAccountType => 'कृपया खाता प्रकार चुनें';
@override
String get amount => 'राशि';
@override
String get amountRequired => 'राशि आवश्यक है';
@override
String get validAmount => 'एक मान्य राशि दर्ज करें';
@override
String get swipeToPay => 'भुगतान करने के लिए स्वाइप करें';
@override
String get outsideBank => 'बाहरी बैंक';
@override
String get ownBank => 'स्वयं का बैंक';
@override
String get neft => 'एनईएफटी';
@override
String get rtgs => 'आरटीजीएस';
@override
String get imps => 'आईएमपीएस';
@override
String get quickPayOutsideBank => 'त्वरित भुगतान - बाहरी बैंक';
@override
String get debitFrom => 'से डेबिट करें';
@override
String get bankNameRequired => 'बैंक का नाम आवश्यक है';
@override
String get branchNameRequired => 'शाखा का नाम आवश्यक है';
@override
String get ifscRequired => 'आईएफएससी कोड आवश्यक है';
@override
String get phoneRequired => 'फ़ोन नंबर आवश्यक है';
@override
String get transactionMode => 'लेन-देन का माध्यम';
@override
String get payingVia => 'के माध्यम से भुगतान';
@override
String get accountOpeningDeposit => 'खाता खोलने का अनुरोध - जमा';
@override
String get accountOpeningLoan => 'खाता खोलने का अनुरोध - ऋण';
@override
String get branchLocator => 'शाखा लोकेटर';
@override
String get emailLaunchError => 'ईमेल क्लाइंट खोलने में विफल: ';
@override
String get dialerLaunchError => 'डायलर खोलने में विफल: ';
@override
String get writeToUs => 'हमें लिखें';
@override
String get keyContacts => 'मुख्य संपर्क';
@override
String get chairman => 'अध्यक्ष';
@override
String get managingDirector => 'प्रबंध निदेशक';
@override
String get gmWest => 'महाप्रबंधक (पश्चिम)';
@override
String get gmNorth => 'महाप्रबंधक (उत्तर)';
@override
String get enquiry => 'पूछताछ';
@override
String get fundTransferBeneficiary => 'फंड ट्रांसफर - लाभार्थी';
@override
String get enterAmount => 'राशि दर्ज करें';
@override
String get customerNumber => 'ग्राहक संख्या';
@override
String get productName => 'उत्पाद का नाम';
@override
String get accountStatus => 'खाता स्थिति';
@override
String get availableBalance => 'उपलब्ध शेष राशि';
@override
String get currentBalance => 'वर्तमान शेष राशि';
@override
String get filters => 'फ़िल्टर';
@override
String get fromDate => 'प्रारंभ तिथि';
@override
String get toDate => 'अंतिम तिथि';
@override
String get minAmount => 'न्यूनतम राशि';
@override
String get maxAmount => 'अधिकतम राशि';
@override
String get lastTenTransactions => 'अंतिम 10 लेनदेन प्रदर्शित किए जा रहे हैं';
@override
String get applyDebitCard => 'डेबिट कार्ड के लिए आवेदन करें';
@override
String get blockUnblockCard => 'कार्ड ब्लॉक/अनब्लॉक करें';
@override
String get changeCardPin => 'कार्ड पिन बदलें';
@override
String get cardNumber => 'कार्ड संख्या';
@override
String get cvv => 'सीवीवी';
@override
String get expiryDate => 'समाप्ति तिथि';
@override
String get next => 'आगे';
@override
String get block => 'ब्लॉक करें';
@override
String get approvedAmount => 'स्वीकृत राशि';
@override
String get failedToLoadTransactions => 'लेन-देन लोड करने में विफल';
@override
String get pleaseSelectDateFirst => 'कृपया पहले तिथि चुनें';
@override
String get cardBlocked => 'कार्ड ब्लॉक कर दिया गया है';
@override
String get blockCard => 'कार्ड ब्लॉक करें';
@override
String get enterValidCardNumber => 'मान्य कार्ड नंबर दर्ज करें';
@override
String get cvv3Digits => 'सीवीवी 3 अंकों का होना चाहिए';
@override
String get selectExpiryDate => 'समाप्ति तिथि चुनें';
@override
String get cardManagement => 'कार्ड प्रबंधन';
@override
String get paymentResult => 'भुगतान परिणाम';
@override
String get failedToShareScreenshot => 'स्क्रीनशॉट साझा करने में विफल';
@override
String get paymentSuccessful => 'भुगतान सफल';
@override
String get cardDetails => 'कार्ड विवरण';
@override
String get cardPin => 'कार्ड पिन';
@override
String get amountEntered => 'दर्ज की गई राशि';
@override
String get enterNewPin => 'नया पिन दर्ज करें';
@override
String get pleaseEnterNewPin => 'कृपया नया पिन दर्ज करें';
@override
String get pin4Digits => 'पिन कम से कम 4 अंकों का होना चाहिए';
@override
String get enterAgain => 'पुनः दर्ज करें';
@override
String get pinsDoNotMatch => 'PIN मेल नहीं खा रहे हैं। पुनः प्रयास करें।';
@override
String get submit => 'जमा करें';
@override
String get chequeManagement => 'चेक प्रबंधन';
@override
String get requestChequeBook => 'चेकबुक का अनुरोध करें';
@override
String get chequeDeposit => 'चेक जमा';
@override
String get stopCheque => 'चेक रोकें';
@override
String get revokeStop => 'रोक हटाएं';
@override
String get positivePay => 'पॉजिटिव पे';
@override
String get pinSetSuccess => 'पिन सफलतापूर्वक सेट किया गया';
@override
String get creditedAccount => 'क्रेडिटेड खाता';
@override
String get date => 'तिथि';
@override
String get paymentFailed => 'भुगतान विफल';
@override
String get share => 'साझा करें';
@override
String get done => 'पूर्ण';
@override
String get invalidOtp => 'अमान्य ओटीपी';
@override
String get enterOtp => 'ओटीपी दर्ज करें';
@override
String get otpVerification => 'ओटीपी सत्यापन';
@override
String get otpSentMessage =>
'अपने मोबाइल नंबर पर भेजा गया 4-अंकों का ओटीपी दर्ज करें';
@override
String get verifyOtp => 'ओटीपी सत्यापित करें';
@override
String get otpResent => 'ओटीपी पुनः भेजा गया';
@override
String get resendOtp => 'ओटीपी पुनः भेजें';
@override
String get setTpin => 'टी-पिन सेट करें';
@override
String get tpinRequired => 'टी-पिन आवश्यक है';
@override
String get tpinRequiredMessage =>
'सुरक्षित लेनदेन के लिए टी-पिन सेट करना आवश्यक है';
@override
String get setTpinTitle => 'टी-पिन सेट करें';
@override
String get tpinInfo =>
'आपका टी-पिन 6 अंकों का कोड है जिसका उपयोग लेन-देन को प्रमाणित करने के लिए किया जाता है। इसे सुरक्षित रखें और किसी से साझा न करें।';
@override
String get tpinFailed => 'टी-पिन सेट करने में विफल। कृपया पुनः प्रयास करें।';
@override
String get success => 'सफलता!';
@override
String get tpinSetSuccess => 'आपका टी-पिन सफलतापूर्वक सेट हो गया है';
@override
String get ok => 'ठीक है';
@override
String get pinsMismatchRetry => 'पिन मेल नहीं खाते। पुनः प्रयास करें।';
@override
String get pleaseEnter6Digits => 'कृपया 6 अंक दर्ज करें';
@override
String get setNewTpin => 'अपना नया टी-पिन सेट करें';
@override
String get confirmNewTpin => 'अपना नया टी-पिन पुष्टि करें';
@override
String get tpinStatusFailed => 'टी-पिन स्थिति की जांच करने में विफल';
@override
String get enter6DigitTpin => 'कृपया 6 अंकों का टी-पिन दर्ज करें';
@override
String get tpin => 'टी-पिन';
@override
String get enterTpin => 'अपना टी-पिन दर्ज करें';
@override
String get transactionSuccess => 'लेन-देन सफल रहा';
@override
String get on => 'पर';
@override
String get toAccountNumber => 'खाते संख्या में';
@override
String get shareText => 'साझा करें';
@override
String get enableFingerprintLogin => 'फिंगरप्रिंट लॉगिन सक्षम करें?';
@override
String get enableFingerprintMessage =>
'क्या आप तेज लॉगिन के लिए फिंगरप्रिंट प्रमाणीकरण सक्षम करना चाहेंगे?';
@override
String get no => 'नहीं';
@override
String get yes => 'हाँ';
@override
String get authenticateToEnable =>
'फिंगरप्रिंट लॉगिन सक्षम करने के लिए प्रमाणीकरण करें';
@override
String get exitApp => 'ऐप बंद करें';
@override
String get exitConfirmation => 'क्या आप वाकई ऐप से बाहर निकलना चाहते हैं?';
@override
String get loading => 'लोड हो रहा है......';
@override
String get enableFingerprintQuick =>
'तेज़ लॉगिन के लिए फिंगरप्रिंट प्रमाणीकरण सक्षम करें?';
@override
String get kccb => 'केसीसीबी';
@override
String get password => 'पासवर्ड';
@override
String get pleaseEnterUsername => 'कृपया उपयोगकर्ता नाम दर्ज करें';
@override
String get pleaseEnterPassword => 'कृपया पासवर्ड दर्ज करें';
@override
String get login => 'लॉगिन';
@override
String get or => 'या';
@override
String get register => 'रजिस्टर करें';
@override
String get authenticateToAccess => 'kmobile तक पहुंच के लिए प्रमाणीकरण करें';
@override
String get incorrectMPIN => 'गलत mPIN. कृपया पुनः प्रयास करें।';
@override
String get pleaseEnter4Digits => 'कृपया 4 अंक दर्ज करें।';
@override
String get enterMPIN => 'अपना mPIN दर्ज करें';
@override
String get setMPIN => 'अपना mPIN सेट करें';
@override
String get confirmMPIN => 'अपना mPIN की पुष्टि करें';
@override
String get kconnect => 'केकनेक्ट';
@override
String get kccBankFull => 'कांगड़ा सेंट्रल को-ऑपरेटिव बैंक';
}

View File

@@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: async
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
url: "https://pub.dev"
source: hosted
version: "2.11.0"
version: "2.13.0"
bloc:
dependency: "direct main"
description:
@@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: boolean_selector
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
chalkdart:
dependency: transitive
description:
@@ -53,10 +53,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.4.0"
checked_yaml:
dependency: transitive
description:
@@ -77,18 +77,18 @@ packages:
dependency: transitive
description:
name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
url: "https://pub.dev"
source: hosted
version: "1.1.1"
version: "1.1.2"
collection:
dependency: transitive
description:
name: collection
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
url: "https://pub.dev"
source: hosted
version: "1.18.0"
version: "1.19.1"
cross_file:
dependency: transitive
description:
@@ -141,10 +141,10 @@ packages:
dependency: transitive
description:
name: fake_async
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
url: "https://pub.dev"
source: hosted
version: "1.3.1"
version: "1.3.3"
ffi:
dependency: transitive
description:
@@ -337,10 +337,10 @@ packages:
dependency: "direct main"
description:
name: intl
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
url: "https://pub.dev"
source: hosted
version: "0.19.0"
version: "0.20.2"
js:
dependency: transitive
description:
@@ -361,18 +361,18 @@ packages:
dependency: transitive
description:
name: leak_tracker
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
url: "https://pub.dev"
source: hosted
version: "10.0.5"
version: "10.0.9"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
url: "https://pub.dev"
source: hosted
version: "3.0.5"
version: "3.0.9"
leak_tracker_testing:
dependency: transitive
description:
@@ -441,10 +441,10 @@ packages:
dependency: transitive
description:
name: matcher
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.dev"
source: hosted
version: "0.12.16+1"
version: "0.12.17"
material_color_utilities:
dependency: transitive
description:
@@ -465,10 +465,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.16.0"
mime:
dependency: transitive
description:
@@ -489,10 +489,10 @@ packages:
dependency: transitive
description:
name: path
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
url: "https://pub.dev"
source: hosted
version: "1.9.0"
version: "1.9.1"
path_parsing:
dependency: transitive
description:
@@ -673,15 +673,15 @@ packages:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
version: "0.0.0"
source_span:
dependency: transitive
description:
name: source_span
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.10.1"
sprintf:
dependency: transitive
description:
@@ -694,42 +694,42 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
url: "https://pub.dev"
source: hosted
version: "1.11.1"
version: "1.12.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
version: "2.1.4"
string_scanner:
dependency: transitive
description:
name: string_scanner
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.4.1"
term_glyph:
dependency: transitive
description:
name: term_glyph
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
url: "https://pub.dev"
source: hosted
version: "1.2.1"
version: "1.2.2"
test_api:
dependency: transitive
description:
name: test_api
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
url: "https://pub.dev"
source: hosted
version: "0.7.2"
version: "0.7.4"
typed_data:
dependency: transitive
description:
@@ -846,10 +846,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
url: "https://pub.dev"
source: hosted
version: "14.2.5"
version: "15.0.0"
web:
dependency: transitive
description:
@@ -891,5 +891,5 @@ packages:
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.5.0 <4.0.0"
dart: ">=3.7.0-0 <4.0.0"
flutter: ">=3.24.0"