diff --git a/l10n.yaml b/l10n.yaml index fd2eafc..ea18387 100644 --- a/l10n.yaml +++ b/l10n.yaml @@ -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 \ No newline at end of file diff --git a/lib/api/interceptors/auth_interceptor.dart b/lib/api/interceptors/auth_interceptor.dart index 53c4824..d4925dc 100644 --- a/lib/api/interceptors/auth_interceptor.dart +++ b/lib/api/interceptors/auth_interceptor.dart @@ -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 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 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); } -} \ No newline at end of file +} diff --git a/lib/api/services/beneficiary_service.dart b/lib/api/services/beneficiary_service.dart new file mode 100644 index 0000000..cde8805 --- /dev/null +++ b/lib/api/services/beneficiary_service.dart @@ -0,0 +1,25 @@ +import 'package:dio/dio.dart'; + +class BeneficiaryService { + final Dio _dio; + + BeneficiaryService(this._dio); + + Future 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()}'); + } + } +} \ No newline at end of file diff --git a/lib/api/services/payment_service.dart b/lib/api/services/payment_service.dart index f771218..15464c9 100644 --- a/lib/api/services/payment_service.dart +++ b/lib/api/services/payment_service.dart @@ -11,8 +11,8 @@ class PaymentService { Future 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()}'); diff --git a/lib/app.dart b/lib/app.dart index 5e44d7f..284429d 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -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 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 { ); return MultiBlocProvider( - providers: [ - BlocProvider(create: (_) => getIt()), - ], + providers: [BlocProvider(create: (_) => getIt())], 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 { 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 { } } -/* @override + /* @override Widget build(BuildContext context) { if (_checking) { return const SplashScreen(); @@ -336,9 +331,7 @@ class _AuthGateState extends State { mode: MPinMode.enter, onCompleted: (_) { Navigator.of(context).pushReplacement( - MaterialPageRoute( - builder: (_) => const NavigationScaffold(), - ), + MaterialPageRoute(builder: (_) => const NavigationScaffold()), ); }, ); @@ -353,8 +346,9 @@ class _AuthGateState extends State { 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 { 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 { } Navigator.of(context).pushReplacement( - MaterialPageRoute( - builder: (_) => const NavigationScaffold(), - ), + MaterialPageRoute(builder: (_) => const NavigationScaffold()), ); }, ); @@ -480,26 +473,27 @@ class _NavigationScaffoldState extends State { 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, + ), ], ), ), diff --git a/lib/config/themes.dart b/lib/config/themes.dart index 6230e60..e37a93f 100644 --- a/lib/config/themes.dart +++ b/lib/config/themes.dart @@ -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( diff --git a/lib/di/injection.dart b/lib/di/injection.dart index db1c864..ec7c3de 100644 --- a/lib/di/injection.dart +++ b/lib/di/injection.dart @@ -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 setupDependencies() async { TransactionRepositoryImpl(getIt())); getIt.registerSingleton(PaymentService(getIt())); + getIt.registerSingleton(BeneficiaryService(getIt())); // Add auth interceptor after repository is available getIt().interceptors.add( diff --git a/lib/features/accounts/screens/account_info_screen.dart b/lib/features/accounts/screens/account_info_screen.dart index f8e2018..920b0e3 100644 --- a/lib/features/accounts/screens/account_info_screen.dart +++ b/lib/features/accounts/screens/account_info_screen.dart @@ -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 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 createState() => _AccountInfoScreen(); @@ -37,8 +40,10 @@ class _AccountInfoScreen extends State { ), 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 { 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 { // 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), ), ], ), diff --git a/lib/features/accounts/screens/account_statement_screen.dart b/lib/features/accounts/screens/account_statement_screen.dart index 2a9400c..955179c 100644 --- a/lib/features/accounts/screens/account_statement_screen.dart +++ b/lib/features/accounts/screens/account_statement_screen.dart @@ -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 createState() => _AccountStatementScreen(); @@ -45,8 +42,10 @@ class _AccountStatementScreen extends State { 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 { 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 { ), 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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), + ), ); }, ), diff --git a/lib/features/auth/screens/login_screen.dart b/lib/features/auth/screens/login_screen.dart index e7b5723..6bec0bb 100644 --- a/lib/features/auth/screens/login_screen.dart +++ b/lib/features/auth/screens/login_screen.dart @@ -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 void _submitForm() { if (_formKey.currentState!.validate()) { context.read().login( - _customerNumberController.text.trim(), - _passwordController.text, - ); + _customerNumberController.text.trim(), + _passwordController.text, + ); } } @@ -69,10 +69,13 @@ class LoginScreenState extends State 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 ); } } 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 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 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 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 }, ), const SizedBox(height: 24), -// Password + // Password TextFormField( controller: _passwordController, obscureText: _obscurePassword, @@ -233,10 +240,11 @@ class LoginScreenState extends State //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 } } - /*import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:kmobile/di/injection.dart'; diff --git a/lib/features/auth/screens/mpin_screen.dart b/lib/features/auth/screens/mpin_screen.dart index 1f8355b..6942f54 100644 --- a/lib/features/auth/screens/mpin_screen.dart +++ b/lib/features/auth/screens/mpin_screen.dart @@ -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 { ['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9'], - ['Enter', '0', '<'] + ['Enter', '0', '<'], ]; return Column( @@ -174,8 +174,9 @@ class _MPinScreenState extends State { _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 { 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(), diff --git a/lib/features/auth/screens/welcome_screen.dart b/lib/features/auth/screens/welcome_screen.dart index 82fe505..3183b7c 100644 --- a/lib/features/auth/screens/welcome_screen.dart +++ b/lib/features/auth/screens/welcome_screen.dart @@ -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 { left: 0, right: 0, child: Center( - child: CircularProgressIndicator( - color: Colors.white, - ), + child: CircularProgressIndicator(color: Colors.white), ), ), ], @@ -138,6 +136,3 @@ class WelcomeScreen extends StatelessWidget { } } */ - - - diff --git a/lib/features/beneficiaries/screens/add_beneficiary_screen.dart b/lib/features/beneficiaries/screens/add_beneficiary_screen.dart index 82d1eb5..0a0d61a 100644 --- a/lib/features/beneficiaries/screens/add_beneficiary_screen.dart +++ b/lib/features/beneficiaries/screens/add_beneficiary_screen.dart @@ -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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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 { 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), ], diff --git a/lib/features/beneficiaries/screens/manage_beneficiaries_screen.dart b/lib/features/beneficiaries/screens/manage_beneficiaries_screen.dart index 3e23a5c..2f0b866 100644 --- a/lib/features/beneficiaries/screens/manage_beneficiaries_screen.dart +++ b/lib/features/beneficiaries/screens/manage_beneficiaries_screen.dart @@ -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 { final List> 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 { 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 { 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], diff --git a/lib/features/card/screens/block_card_screen.dart b/lib/features/card/screens/block_card_screen.dart index 0f700b6..6d3ef64 100644 --- a/lib/features/card/screens/block_card_screen.dart +++ b/lib/features/card/screens/block_card_screen.dart @@ -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 { diff --git a/lib/features/card/screens/card_management_screen.dart b/lib/features/card/screens/card_management_screen.dart index c6c1770..44bca9e 100644 --- a/lib/features/card/screens/card_management_screen.dart +++ b/lib/features/card/screens/card_management_screen.dart @@ -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 { 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), ], ), ); diff --git a/lib/features/card/screens/card_pin_change_details_screen.dart b/lib/features/card/screens/card_pin_change_details_screen.dart index b7a2ed9..4a66a14 100644 --- a/lib/features/card/screens/card_pin_change_details_screen.dart +++ b/lib/features/card/screens/card_pin_change_details_screen.dart @@ -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}); diff --git a/lib/features/card/screens/card_pin_set_screen.dart b/lib/features/card/screens/card_pin_set_screen.dart index fbe427c..ddb0a4b 100644 --- a/lib/features/card/screens/card_pin_set_screen.dart +++ b/lib/features/card/screens/card_pin_set_screen.dart @@ -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}); diff --git a/lib/features/cheque/screens/cheque_management_screen.dart b/lib/features/cheque/screens/cheque_management_screen.dart index 7b89eeb..89b5c3a 100644 --- a/lib/features/cheque/screens/cheque_management_screen.dart +++ b/lib/features/cheque/screens/cheque_management_screen.dart @@ -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 { 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), ], ), ); diff --git a/lib/features/customer_info/screens/customer_info_screen.dart b/lib/features/customer_info/screens/customer_info_screen.dart index 3d37120..dbdacd5 100644 --- a/lib/features/customer_info/screens/customer_info_screen.dart +++ b/lib/features/customer_info/screens/customer_info_screen.dart @@ -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 { @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), ), ], ), diff --git a/lib/features/dashboard/screens/dashboard_screen.dart b/lib/features/dashboard/screens/dashboard_screen.dart index 7d95674..703ddb0 100644 --- a/lib/features/dashboard/screens/dashboard_screen.dart +++ b/lib/features/dashboard/screens/dashboard_screen.dart @@ -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 { 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 { } 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 { 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 { 'dr.', 'shri', 'smt.', - 'kumari' + 'kumari', ]; String processed = name.trim().toLowerCase(); for (final title in titles) { @@ -151,6 +155,7 @@ class _DashboardScreenState extends State { 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 { 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 { Navigator.push( context, MaterialPageRoute( - builder: (context) => const ProfileScreen()), + builder: (context) => const ProfileScreen(), + ), ); }, child: CircleAvatar( @@ -228,265 +235,334 @@ class _DashboardScreenState extends State { ), ], ), - body: BlocBuilder(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]; - // first‐time load - if (!_txInitialized) { - _txInitialized = true; - WidgetsBinding.instance.addPostFrameCallback((_) { - _loadTransactions(currAccount.accountNo!); - }); + body: BlocBuilder( + 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]; + // first‐time 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( - 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( - 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( + 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( + 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 { : '', 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 { }); } - 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), + ), ], ), ); diff --git a/lib/features/dashboard/widgets/account_card.dart b/lib/features/dashboard/widgets/account_card.dart index 5411aea..50bd935 100644 --- a/lib/features/dashboard/widgets/account_card.dart +++ b/lib/features/dashboard/widgets/account_card.dart @@ -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), ), ], ), diff --git a/lib/features/enquiry/screens/enquiry_screen.dart b/lib/features/enquiry/screens/enquiry_screen.dart index f5e0edd..c0d01cb 100644 --- a/lib/features/enquiry/screens/enquiry_screen.dart +++ b/lib/features/enquiry/screens/enquiry_screen.dart @@ -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 { 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", diff --git a/lib/features/fund_transfer/screens/fund_transfer_beneficiary_screen.dart b/lib/features/fund_transfer/screens/fund_transfer_beneficiary_screen.dart index e8449cc..766ca95 100644 --- a/lib/features/fund_transfer/screens/fund_transfer_beneficiary_screen.dart +++ b/lib/features/fund_transfer/screens/fund_transfer_beneficiary_screen.dart @@ -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 { final List> 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], diff --git a/lib/features/fund_transfer/screens/fund_transfer_screen.dart b/lib/features/fund_transfer/screens/fund_transfer_screen.dart index 7672eac..34b849f 100644 --- a/lib/features/fund_transfer/screens/fund_transfer_screen.dart +++ b/lib/features/fund_transfer/screens/fund_transfer_screen.dart @@ -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 { ); } 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 { 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), diff --git a/lib/features/fund_transfer/screens/payment_animation.dart b/lib/features/fund_transfer/screens/payment_animation.dart index b86adb3..b16c609 100644 --- a/lib/features/fund_transfer/screens/payment_animation.dart +++ b/lib/features/fund_transfer/screens/payment_animation.dart @@ -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; - const PaymentAnimationScreen({ - super.key, - required this.paymentResponse, - }); + const PaymentAnimationScreen({super.key, required this.paymentResponse}); @override State createState() => _PaymentAnimationScreenState(); @@ -29,22 +26,26 @@ class _PaymentAnimationScreenState extends State { 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 { ? 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 { 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 { 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 { 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, + ), ), ), ], diff --git a/lib/features/fund_transfer/screens/tpin_otp_screen.dart b/lib/features/fund_transfer/screens/tpin_otp_screen.dart index baa46e4..01849df 100644 --- a/lib/features/fund_transfer/screens/tpin_otp_screen.dart +++ b/lib/features/fund_transfer/screens/tpin_otp_screen.dart @@ -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 { final List _focusNodes = List.generate(4, (_) => FocusNode()); - final List _controllers = - List.generate(4, (_) => TextEditingController()); + final List _controllers = List.generate( + 4, + (_) => TextEditingController(), + ); @override void dispose() { @@ -42,9 +44,7 @@ class _TpinOtpScreenState extends State { 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 { 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 { ), 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 { // 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), diff --git a/lib/features/fund_transfer/screens/tpin_prompt_screen.dart b/lib/features/fund_transfer/screens/tpin_prompt_screen.dart index efbdf52..c8113cc 100644 --- a/lib/features/fund_transfer/screens/tpin_prompt_screen.dart +++ b/lib/features/fund_transfer/screens/tpin_prompt_screen.dart @@ -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()), ); }, ), diff --git a/lib/features/fund_transfer/screens/tpin_set_screen.dart b/lib/features/fund_transfer/screens/tpin_set_screen.dart index df01de0..23e40e5 100644 --- a/lib/features/fund_transfer/screens/tpin_set_screen.dart +++ b/lib/features/fund_transfer/screens/tpin_set_screen.dart @@ -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 { 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 { 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 { ['1', '2', '3'], ['4', '5', '6'], ['7', '8', '9'], - ['Enter', '0', '<'] + ['Enter', '0', '<'], ]; return Column( @@ -144,8 +149,9 @@ class _TpinSetScreenState extends State { _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 { 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(), diff --git a/lib/features/fund_transfer/screens/transaction_pin_screen.dart b/lib/features/fund_transfer/screens/transaction_pin_screen.dart index df4c387..4cbbd06 100644 --- a/lib/features/fund_transfer/screens/transaction_pin_screen.dart +++ b/lib/features/fund_transfer/screens/transaction_pin_screen.dart @@ -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 { 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 { 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 { } 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 { 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 { 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()))); } } } diff --git a/lib/features/fund_transfer/screens/transaction_success_screen.dart b/lib/features/fund_transfer/screens/transaction_success_screen.dart index d79f738..7ff6a8b 100644 --- a/lib/features/fund_transfer/screens/transaction_success_screen.dart +++ b/lib/features/fund_transfer/screens/transaction_success_screen.dart @@ -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 { @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 { 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 { 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 { onPressed: () { // Done action Navigator.push( - context, - MaterialPageRoute( - builder: (context) => - const NavigationScaffold())); + context, + MaterialPageRoute( + builder: (context) => const NavigationScaffold(), + ), + ); }, style: ElevatedButton.styleFrom( shape: const StadiumBorder(), diff --git a/lib/features/profile/preferences/language_dialog.dart b/lib/features/profile/preferences/language_dialog.dart index 8044793..4ee88e6 100644 --- a/lib/features/profile/preferences/language_dialog.dart +++ b/lib/features/profile/preferences/language_dialog.dart @@ -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), diff --git a/lib/features/profile/preferences/preference_screen.dart b/lib/features/profile/preferences/preference_screen.dart index 8fb28d0..628da3e 100644 --- a/lib/features/profile/preferences/preference_screen.dart +++ b/lib/features/profile/preferences/preference_screen.dart @@ -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}); diff --git a/lib/features/profile/profile_screen.dart b/lib/features/profile/profile_screen.dart index ed98100..15df270 100644 --- a/lib/features/profile/profile_screen.dart +++ b/lib/features/profile/profile_screen.dart @@ -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()), ); }, ), diff --git a/lib/features/quick_pay/screens/quick_pay_outside_bank_screen.dart b/lib/features/quick_pay/screens/quick_pay_outside_bank_screen.dart index c8e9df1..83c5a0c 100644 --- a/lib/features/quick_pay/screens/quick_pay_outside_bank_screen.dart +++ b/lib/features/quick_pay/screens/quick_pay_outside_bank_screen.dart @@ -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 { 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 { 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( @@ -287,15 +290,16 @@ class _QuickPayOutsideBankScreen extends State { 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 { 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 { alignment: Alignment.center, child: Text( transactionModes(context)[index], - style: const TextStyle( - color: Colors.black, - ), + style: const TextStyle(color: Colors.black), ), ), ), diff --git a/lib/features/quick_pay/screens/quick_pay_screen.dart b/lib/features/quick_pay/screens/quick_pay_screen.dart index 2b3fe95..d8af4b5 100644 --- a/lib/features/quick_pay/screens/quick_pay_screen.dart +++ b/lib/features/quick_pay/screens/quick_pay_screen.dart @@ -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 { }, ), 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 { 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), ], ), ); diff --git a/lib/features/quick_pay/screens/quick_pay_within_bank_screen.dart b/lib/features/quick_pay/screens/quick_pay_within_bank_screen.dart index 71c04d3..5d2ca37 100644 --- a/lib/features/quick_pay/screens/quick_pay_within_bank_screen.dart +++ b/lib/features/quick_pay/screens/quick_pay_within_bank_screen.dart @@ -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 { 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 _validateBeneficiary() async { + var beneficiaryService = getIt(); + 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 { ), 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 { 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 { 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 { 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 { 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( 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 { 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 { 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, + ), + ), + ), + ); } }, ), diff --git a/lib/features/service/screens/service_screen.dart b/lib/features/service/screens/service_screen.dart index fa0fca1..ac43687 100644 --- a/lib/features/service/screens/service_screen.dart +++ b/lib/features/service/screens/service_screen.dart @@ -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 { }, 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 { 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), ], ), ); diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart new file mode 100644 index 0000000..c317519 --- /dev/null +++ b/lib/l10n/app_localizations.dart @@ -0,0 +1,1381 @@ +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:intl/intl.dart' as intl; + +import 'app_localizations_en.dart'; +import 'app_localizations_hi.dart'; + +// ignore_for_file: type=lint + +/// Callers can lookup localized strings with an instance of AppLocalizations +/// returned by `AppLocalizations.of(context)`. +/// +/// Applications need to include `AppLocalizations.delegate()` in their app's +/// `localizationDelegates` list, and the locales they support in the app's +/// `supportedLocales` list. For example: +/// +/// ```dart +/// import 'l10n/app_localizations.dart'; +/// +/// return MaterialApp( +/// localizationsDelegates: AppLocalizations.localizationsDelegates, +/// supportedLocales: AppLocalizations.supportedLocales, +/// home: MyApplicationHome(), +/// ); +/// ``` +/// +/// ## Update pubspec.yaml +/// +/// Please make sure to update your pubspec.yaml to include the following +/// packages: +/// +/// ```yaml +/// dependencies: +/// # Internationalization support. +/// flutter_localizations: +/// sdk: flutter +/// intl: any # Use the pinned version from flutter_localizations +/// +/// # Rest of dependencies +/// ``` +/// +/// ## iOS Applications +/// +/// iOS applications define key application metadata, including supported +/// locales, in an Info.plist file that is built into the application bundle. +/// To configure the locales supported by your app, you’ll need to edit this +/// file. +/// +/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file. +/// Then, in the Project Navigator, open the Info.plist file under the Runner +/// project’s Runner folder. +/// +/// Next, select the Information Property List item, select Add Item from the +/// Editor menu, then select Localizations from the pop-up menu. +/// +/// Select and expand the newly-created Localizations item then, for each +/// locale your application supports, add a new item and select the locale +/// you wish to add from the pop-up menu in the Value field. This list should +/// be consistent with the languages listed in the AppLocalizations.supportedLocales +/// property. +abstract class AppLocalizations { + AppLocalizations(String locale) + : localeName = intl.Intl.canonicalizedLocale(locale.toString()); + + final String localeName; + + static AppLocalizations of(BuildContext context) { + return Localizations.of(context, AppLocalizations)!; + } + + static const LocalizationsDelegate delegate = + _AppLocalizationsDelegate(); + + /// A list of this localizations delegate along with the default localizations + /// delegates. + /// + /// Returns a list of localizations delegates containing this delegate along with + /// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, + /// and GlobalWidgetsLocalizations.delegate. + /// + /// Additional delegates can be added by appending to this list in + /// MaterialApp. This list does not have to be used at all if a custom list + /// of delegates is preferred or required. + static const List> localizationsDelegates = + >[ + delegate, + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ]; + + /// A list of this localizations delegate's supported locales. + static const List supportedLocales = [ + Locale('en'), + Locale('hi') + ]; + + /// No description provided for @profile. + /// + /// In en, this message translates to: + /// **'Profile'** + String get profile; + + /// No description provided for @preferences. + /// + /// In en, this message translates to: + /// **'Preferences'** + String get preferences; + + /// No description provided for @language. + /// + /// In en, this message translates to: + /// **'Language'** + String get language; + + /// No description provided for @selectLanguage. + /// + /// In en, this message translates to: + /// **'Select Language'** + String get selectLanguage; + + /// No description provided for @english. + /// + /// In en, this message translates to: + /// **'English'** + String get english; + + /// No description provided for @hindi. + /// + /// In en, this message translates to: + /// **'Hindi'** + String get hindi; + + /// No description provided for @cancel. + /// + /// In en, this message translates to: + /// **'Cancel'** + String get cancel; + + /// No description provided for @home. + /// + /// In en, this message translates to: + /// **'Home'** + String get home; + + /// No description provided for @card. + /// + /// In en, this message translates to: + /// **'Card'** + String get card; + + /// No description provided for @services. + /// + /// In en, this message translates to: + /// **'Services'** + String get services; + + /// No description provided for @quickPay. + /// + /// In en, this message translates to: + /// **'Quick \n Pay'** + String get quickPay; + + /// No description provided for @quickLinks. + /// + /// In en, this message translates to: + /// **'Quick Links'** + String get quickLinks; + + /// No description provided for @recentTransactions. + /// + /// In en, this message translates to: + /// **'Recent Transactions'** + String get recentTransactions; + + /// No description provided for @accountNumber. + /// + /// In en, this message translates to: + /// **'Account Number'** + String get accountNumber; + + /// No description provided for @enableBiometric. + /// + /// In en, this message translates to: + /// **'Enable Biometric Authentication'** + String get enableBiometric; + + /// No description provided for @useBiometricPrompt. + /// + /// In en, this message translates to: + /// **'Use fingerprint/face ID for faster login?'** + String get useBiometricPrompt; + + /// No description provided for @later. + /// + /// In en, this message translates to: + /// **'Later'** + String get later; + + /// No description provided for @enable. + /// + /// In en, this message translates to: + /// **'Enable'** + String get enable; + + /// No description provided for @noTransactions. + /// + /// In en, this message translates to: + /// **'No transactions found for this account.'** + String get noTransactions; + + /// No description provided for @somethingWentWrong. + /// + /// In en, this message translates to: + /// **'Something went wrong'** + String get somethingWentWrong; + + /// No description provided for @failedToLoad. + /// + /// In en, this message translates to: + /// **'Failed to load transactions: {error}'** + String failedToLoad(Object error); + + /// No description provided for @failedToRefresh. + /// + /// In en, this message translates to: + /// **'Failed to refresh data'** + String get failedToRefresh; + + /// No description provided for @hi. + /// + /// In en, this message translates to: + /// **'Hi'** + String get hi; + + /// No description provided for @kMobile. + /// + /// In en, this message translates to: + /// **'kMobile'** + String get kMobile; + + /// No description provided for @scanBiometric. + /// + /// In en, this message translates to: + /// **'Scan to enable Biometric login'** + String get scanBiometric; + + /// No description provided for @savingsAccount. + /// + /// In en, this message translates to: + /// **'Savings Account'** + String get savingsAccount; + + /// No description provided for @loanAccount. + /// + /// In en, this message translates to: + /// **'Loan Account'** + String get loanAccount; + + /// No description provided for @termDeposit. + /// + /// In en, this message translates to: + /// **'Term Deposit Account'** + String get termDeposit; + + /// No description provided for @recurringDeposit. + /// + /// In en, this message translates to: + /// **'Recurring Deposit Account'** + String get recurringDeposit; + + /// No description provided for @unknownAccount. + /// + /// In en, this message translates to: + /// **'Unknown Account Type'** + String get unknownAccount; + + /// No description provided for @customerInfo. + /// + /// In en, this message translates to: + /// **'Customer \n Info'** + String get customerInfo; + + /// No description provided for @fundTransfer. + /// + /// In en, this message translates to: + /// **'Fund Transfer'** + String get fundTransfer; + + /// No description provided for @accountInfo. + /// + /// In en, this message translates to: + /// **'Account Info'** + String get accountInfo; + + /// No description provided for @accountStatement. + /// + /// In en, this message translates to: + /// **'Account Statement'** + String get accountStatement; + + /// No description provided for @handleCheque. + /// + /// In en, this message translates to: + /// **'Handle \n Cheque'** + String get handleCheque; + + /// No description provided for @manageBeneficiary. + /// + /// In en, this message translates to: + /// **'Manage \n Beneficiary'** + String get manageBeneficiary; + + /// No description provided for @contactUs. + /// + /// In en, this message translates to: + /// **'Contact \n Us'** + String get contactUs; + + /// No description provided for @addBeneficiary. + /// + /// In en, this message translates to: + /// **'Add Beneficiary'** + String get addBeneficiary; + + /// No description provided for @confirmAccountNumber. + /// + /// In en, this message translates to: + /// **'Confirm Account Number'** + String get confirmAccountNumber; + + /// No description provided for @name. + /// + /// In en, this message translates to: + /// **'Name'** + String get name; + + /// No description provided for @ifscCode. + /// + /// In en, this message translates to: + /// **'IFSC Code'** + String get ifscCode; + + /// No description provided for @bankName. + /// + /// In en, this message translates to: + /// **'Beneficiary Bank Name'** + String get bankName; + + /// No description provided for @branchName. + /// + /// In en, this message translates to: + /// **'Branch Name'** + String get branchName; + + /// No description provided for @accountType. + /// + /// In en, this message translates to: + /// **'Account Type'** + String get accountType; + + /// No description provided for @savings. + /// + /// In en, this message translates to: + /// **'Savings'** + String get savings; + + /// No description provided for @current. + /// + /// In en, this message translates to: + /// **'Current'** + String get current; + + /// No description provided for @phone. + /// + /// In en, this message translates to: + /// **'Phone'** + String get phone; + + /// No description provided for @validateAndAdd. + /// + /// In en, this message translates to: + /// **'Validate and Add'** + String get validateAndAdd; + + /// No description provided for @beneficiaryAdded. + /// + /// In en, this message translates to: + /// **'Beneficiary Added Successfully'** + String get beneficiaryAdded; + + /// No description provided for @invalidIfscFormat. + /// + /// In en, this message translates to: + /// **'Invalid IFSC Format'** + String get invalidIfscFormat; + + /// No description provided for @noIfscDetails. + /// + /// In en, this message translates to: + /// **'No details found for IFSC'** + String get noIfscDetails; + + /// No description provided for @enterValidAccountNumber. + /// + /// In en, this message translates to: + /// **'Enter a valid account number'** + String get enterValidAccountNumber; + + /// No description provided for @reenterAccountNumber. + /// + /// In en, this message translates to: + /// **'Re-enter Account Number'** + String get reenterAccountNumber; + + /// No description provided for @accountMismatch. + /// + /// In en, this message translates to: + /// **'Account Numbers do not match'** + String get accountMismatch; + + /// No description provided for @nameRequired. + /// + /// In en, this message translates to: + /// **'Name is required'** + String get nameRequired; + + /// No description provided for @enterIfsc. + /// + /// In en, this message translates to: + /// **'Enter IFSC code'** + String get enterIfsc; + + /// No description provided for @enterValidPhone. + /// + /// In en, this message translates to: + /// **'Enter a valid phone number'** + String get enterValidPhone; + + /// No description provided for @payNow. + /// + /// In en, this message translates to: + /// **'Pay Now'** + String get payNow; + + /// No description provided for @beneficiaries. + /// + /// In en, this message translates to: + /// **'Beneficiaries'** + String get beneficiaries; + + /// No description provided for @cif. + /// + /// In en, this message translates to: + /// **'CIF'** + String get cif; + + /// No description provided for @activeAccounts. + /// + /// In en, this message translates to: + /// **'Number of Active Accounts'** + String get activeAccounts; + + /// No description provided for @mobileNumber. + /// + /// In en, this message translates to: + /// **'Mobile Number'** + String get mobileNumber; + + /// No description provided for @dateOfBirth. + /// + /// In en, this message translates to: + /// **'Date of Birth'** + String get dateOfBirth; + + /// No description provided for @branchCode. + /// + /// In en, this message translates to: + /// **'Branch Code'** + String get branchCode; + + /// No description provided for @branchAddress. + /// + /// In en, this message translates to: + /// **'Branch Address'** + String get branchAddress; + + /// No description provided for @primaryId. + /// + /// In en, this message translates to: + /// **'Primary ID'** + String get primaryId; + + /// No description provided for @quickPayOwnBank. + /// + /// In en, this message translates to: + /// **'Quick Pay - Own Bank'** + String get quickPayOwnBank; + + /// No description provided for @debitAccountNumber. + /// + /// In en, this message translates to: + /// **'Debit Account Number'** + String get debitAccountNumber; + + /// No description provided for @accountNumberRequired. + /// + /// In en, this message translates to: + /// **'Account Number is required'** + String get accountNumberRequired; + + /// No description provided for @validAccountNumber. + /// + /// In en, this message translates to: + /// **'Enter a valid account number'** + String get validAccountNumber; + + /// No description provided for @beneficiaryAccountType. + /// + /// In en, this message translates to: + /// **'Beneficiary Account Type'** + String get beneficiaryAccountType; + + /// No description provided for @loan. + /// + /// In en, this message translates to: + /// **'Loan'** + String get loan; + + /// No description provided for @selectAccountType. + /// + /// In en, this message translates to: + /// **'Please select account type'** + String get selectAccountType; + + /// No description provided for @amount. + /// + /// In en, this message translates to: + /// **'Amount'** + String get amount; + + /// No description provided for @amountRequired. + /// + /// In en, this message translates to: + /// **'Amount is required'** + String get amountRequired; + + /// No description provided for @validAmount. + /// + /// In en, this message translates to: + /// **'Enter a valid amount'** + String get validAmount; + + /// No description provided for @swipeToPay. + /// + /// In en, this message translates to: + /// **'Swipe to Pay'** + String get swipeToPay; + + /// No description provided for @outsideBank. + /// + /// In en, this message translates to: + /// **'Outside Bank'** + String get outsideBank; + + /// No description provided for @ownBank. + /// + /// In en, this message translates to: + /// **'Own Bank'** + String get ownBank; + + /// No description provided for @neft. + /// + /// In en, this message translates to: + /// **'NEFT'** + String get neft; + + /// No description provided for @rtgs. + /// + /// In en, this message translates to: + /// **'RTGS'** + String get rtgs; + + /// No description provided for @imps. + /// + /// In en, this message translates to: + /// **'IMPS'** + String get imps; + + /// No description provided for @quickPayOutsideBank. + /// + /// In en, this message translates to: + /// **'Quick Pay - Outside Bank'** + String get quickPayOutsideBank; + + /// No description provided for @debitFrom. + /// + /// In en, this message translates to: + /// **'Debit from'** + String get debitFrom; + + /// No description provided for @bankNameRequired. + /// + /// In en, this message translates to: + /// **'Beneficiary Bank name is required'** + String get bankNameRequired; + + /// No description provided for @branchNameRequired. + /// + /// In en, this message translates to: + /// **'Beneficiary Branch Name is required'** + String get branchNameRequired; + + /// No description provided for @ifscRequired. + /// + /// In en, this message translates to: + /// **'IFSC Code is required'** + String get ifscRequired; + + /// No description provided for @phoneRequired. + /// + /// In en, this message translates to: + /// **'Phone number is required'** + String get phoneRequired; + + /// No description provided for @transactionMode. + /// + /// In en, this message translates to: + /// **'Transaction Mode'** + String get transactionMode; + + /// No description provided for @payingVia. + /// + /// In en, this message translates to: + /// **'Paying via'** + String get payingVia; + + /// No description provided for @accountOpeningDeposit. + /// + /// In en, this message translates to: + /// **'Account Opening Request - Deposit'** + String get accountOpeningDeposit; + + /// No description provided for @accountOpeningLoan. + /// + /// In en, this message translates to: + /// **'Account Opening Request - Loan'** + String get accountOpeningLoan; + + /// No description provided for @branchLocator. + /// + /// In en, this message translates to: + /// **'Branch Locator'** + String get branchLocator; + + /// No description provided for @emailLaunchError. + /// + /// In en, this message translates to: + /// **'Could not launch email client for'** + String get emailLaunchError; + + /// No description provided for @dialerLaunchError. + /// + /// In en, this message translates to: + /// **'Could not launch dialer for'** + String get dialerLaunchError; + + /// No description provided for @writeToUs. + /// + /// In en, this message translates to: + /// **'Write to us'** + String get writeToUs; + + /// No description provided for @keyContacts. + /// + /// In en, this message translates to: + /// **'Key Contacts'** + String get keyContacts; + + /// No description provided for @chairman. + /// + /// In en, this message translates to: + /// **'Chairman'** + String get chairman; + + /// No description provided for @managingDirector. + /// + /// In en, this message translates to: + /// **'Managing Director'** + String get managingDirector; + + /// No description provided for @gmWest. + /// + /// In en, this message translates to: + /// **'General Manager (West)'** + String get gmWest; + + /// No description provided for @gmNorth. + /// + /// In en, this message translates to: + /// **'General Manager (North)'** + String get gmNorth; + + /// No description provided for @enquiry. + /// + /// In en, this message translates to: + /// **'Enquiry'** + String get enquiry; + + /// No description provided for @fundTransferBeneficiary. + /// + /// In en, this message translates to: + /// **'Fund Transfer - Beneficiary'** + String get fundTransferBeneficiary; + + /// No description provided for @enterAmount. + /// + /// In en, this message translates to: + /// **'Enter Amount'** + String get enterAmount; + + /// No description provided for @customerNumber. + /// + /// In en, this message translates to: + /// **'Customer Number'** + String get customerNumber; + + /// No description provided for @productName. + /// + /// In en, this message translates to: + /// **'Product Name'** + String get productName; + + /// No description provided for @accountStatus. + /// + /// In en, this message translates to: + /// **'Account Status'** + String get accountStatus; + + /// No description provided for @availableBalance. + /// + /// In en, this message translates to: + /// **'Available Balance'** + String get availableBalance; + + /// No description provided for @currentBalance. + /// + /// In en, this message translates to: + /// **'Current Balance'** + String get currentBalance; + + /// No description provided for @filters. + /// + /// In en, this message translates to: + /// **'Filters'** + String get filters; + + /// No description provided for @fromDate. + /// + /// In en, this message translates to: + /// **'From Date'** + String get fromDate; + + /// No description provided for @toDate. + /// + /// In en, this message translates to: + /// **'To Date'** + String get toDate; + + /// No description provided for @minAmount. + /// + /// In en, this message translates to: + /// **'Min Amount'** + String get minAmount; + + /// No description provided for @maxAmount. + /// + /// In en, this message translates to: + /// **'Max amount'** + String get maxAmount; + + /// No description provided for @lastTenTransactions. + /// + /// In en, this message translates to: + /// **'Showing last 10 transactions'** + String get lastTenTransactions; + + /// No description provided for @applyDebitCard. + /// + /// In en, this message translates to: + /// **'Apply Debit Card'** + String get applyDebitCard; + + /// No description provided for @blockUnblockCard. + /// + /// In en, this message translates to: + /// **'Block / Unblock Card'** + String get blockUnblockCard; + + /// No description provided for @changeCardPin. + /// + /// In en, this message translates to: + /// **'Change Card PIN'** + String get changeCardPin; + + /// No description provided for @cardNumber. + /// + /// In en, this message translates to: + /// **'Card Number'** + String get cardNumber; + + /// No description provided for @cvv. + /// + /// In en, this message translates to: + /// **'CVV'** + String get cvv; + + /// No description provided for @expiryDate. + /// + /// In en, this message translates to: + /// **'Expiry Date'** + String get expiryDate; + + /// No description provided for @next. + /// + /// In en, this message translates to: + /// **'Next'** + String get next; + + /// No description provided for @block. + /// + /// In en, this message translates to: + /// **'Block'** + String get block; + + /// No description provided for @approvedAmount. + /// + /// In en, this message translates to: + /// **'Approved Amount'** + String get approvedAmount; + + /// No description provided for @failedToLoadTransactions. + /// + /// In en, this message translates to: + /// **'Failed to load transactions'** + String get failedToLoadTransactions; + + /// No description provided for @pleaseSelectDateFirst. + /// + /// In en, this message translates to: + /// **'Please select date first'** + String get pleaseSelectDateFirst; + + /// No description provided for @cardBlocked. + /// + /// In en, this message translates to: + /// **'Card has been blocked'** + String get cardBlocked; + + /// No description provided for @blockCard. + /// + /// In en, this message translates to: + /// **'Block Card'** + String get blockCard; + + /// No description provided for @enterValidCardNumber. + /// + /// In en, this message translates to: + /// **'Enter valid card number'** + String get enterValidCardNumber; + + /// No description provided for @cvv3Digits. + /// + /// In en, this message translates to: + /// **'CVV must be 3 digits'** + String get cvv3Digits; + + /// No description provided for @selectExpiryDate. + /// + /// In en, this message translates to: + /// **'Select expiry date'** + String get selectExpiryDate; + + /// No description provided for @cardManagement. + /// + /// In en, this message translates to: + /// **'Card Management'** + String get cardManagement; + + /// No description provided for @paymentResult. + /// + /// In en, this message translates to: + /// **'Payment Result'** + String get paymentResult; + + /// No description provided for @failedToShareScreenshot. + /// + /// In en, this message translates to: + /// **'Failed to share screenshot'** + String get failedToShareScreenshot; + + /// No description provided for @paymentSuccessful. + /// + /// In en, this message translates to: + /// **'Payment successful'** + String get paymentSuccessful; + + /// No description provided for @cardDetails. + /// + /// In en, this message translates to: + /// **'Card Details'** + String get cardDetails; + + /// No description provided for @cardPin. + /// + /// In en, this message translates to: + /// **'Card PIN'** + String get cardPin; + + /// No description provided for @amountEntered. + /// + /// In en, this message translates to: + /// **'Amount entered'** + String get amountEntered; + + /// No description provided for @enterNewPin. + /// + /// In en, this message translates to: + /// **'Enter new PIN'** + String get enterNewPin; + + /// No description provided for @pleaseEnterNewPin. + /// + /// In en, this message translates to: + /// **'Please enter new PIN'** + String get pleaseEnterNewPin; + + /// No description provided for @pin4Digits. + /// + /// In en, this message translates to: + /// **'PIN must be at least 4 digits'** + String get pin4Digits; + + /// No description provided for @enterAgain. + /// + /// In en, this message translates to: + /// **'Enter Again'** + String get enterAgain; + + /// No description provided for @pinsDoNotMatch. + /// + /// In en, this message translates to: + /// **'PINs do not match. Try again.'** + String get pinsDoNotMatch; + + /// No description provided for @submit. + /// + /// In en, this message translates to: + /// **'Submit'** + String get submit; + + /// No description provided for @chequeManagement. + /// + /// In en, this message translates to: + /// **'Cheque Management'** + String get chequeManagement; + + /// No description provided for @requestChequeBook. + /// + /// In en, this message translates to: + /// **'Request Chequebook'** + String get requestChequeBook; + + /// No description provided for @chequeDeposit. + /// + /// In en, this message translates to: + /// **'Cheque Deposit'** + String get chequeDeposit; + + /// No description provided for @stopCheque. + /// + /// In en, this message translates to: + /// **'Stop Cheque'** + String get stopCheque; + + /// No description provided for @revokeStop. + /// + /// In en, this message translates to: + /// **'Revoke Stop'** + String get revokeStop; + + /// No description provided for @positivePay. + /// + /// In en, this message translates to: + /// **'Positive Pay'** + String get positivePay; + + /// No description provided for @pinSetSuccess. + /// + /// In en, this message translates to: + /// **'PIN set successfully'** + String get pinSetSuccess; + + /// No description provided for @creditedAccount. + /// + /// In en, this message translates to: + /// **'Credited Account'** + String get creditedAccount; + + /// No description provided for @date. + /// + /// In en, this message translates to: + /// **'Date'** + String get date; + + /// No description provided for @paymentFailed. + /// + /// In en, this message translates to: + /// **'Payment Failed'** + String get paymentFailed; + + /// No description provided for @share. + /// + /// In en, this message translates to: + /// **'Share'** + String get share; + + /// No description provided for @done. + /// + /// In en, this message translates to: + /// **'Done'** + String get done; + + /// No description provided for @invalidOtp. + /// + /// In en, this message translates to: + /// **'Invalid OTP'** + String get invalidOtp; + + /// No description provided for @enterOtp. + /// + /// In en, this message translates to: + /// **'Enter OTP'** + String get enterOtp; + + /// No description provided for @otpVerification. + /// + /// In en, this message translates to: + /// **'OTP Verification'** + String get otpVerification; + + /// No description provided for @otpSentMessage. + /// + /// In en, this message translates to: + /// **'Enter the 4-digit OTP sent to your mobile number'** + String get otpSentMessage; + + /// No description provided for @verifyOtp. + /// + /// In en, this message translates to: + /// **'Verify OTP'** + String get verifyOtp; + + /// No description provided for @otpResent. + /// + /// In en, this message translates to: + /// **'OTP Resent'** + String get otpResent; + + /// No description provided for @resendOtp. + /// + /// In en, this message translates to: + /// **'Resend OTP'** + String get resendOtp; + + /// No description provided for @setTpin. + /// + /// In en, this message translates to: + /// **'Set TPIN'** + String get setTpin; + + /// No description provided for @tpinRequired. + /// + /// In en, this message translates to: + /// **'TPIN Required'** + String get tpinRequired; + + /// No description provided for @tpinRequiredMessage. + /// + /// In en, this message translates to: + /// **'You need to set your TPIN to continue with secure transactions'** + String get tpinRequiredMessage; + + /// No description provided for @setTpinTitle. + /// + /// In en, this message translates to: + /// **'Set TPIN'** + String get setTpinTitle; + + /// No description provided for @tpinInfo. + /// + /// In en, this message translates to: + /// **'Your TPIN is a 6-digit code used to authorize transactions. Keep it safe and do not share it with anyone.'** + String get tpinInfo; + + /// No description provided for @tpinFailed. + /// + /// In en, this message translates to: + /// **'Failed to set TPIN. Please try again.'** + String get tpinFailed; + + /// No description provided for @success. + /// + /// In en, this message translates to: + /// **'Success!'** + String get success; + + /// No description provided for @tpinSetSuccess. + /// + /// In en, this message translates to: + /// **'Your TPIN was set successfully'** + String get tpinSetSuccess; + + /// No description provided for @ok. + /// + /// In en, this message translates to: + /// **'OK'** + String get ok; + + /// No description provided for @pinsMismatchRetry. + /// + /// In en, this message translates to: + /// **'PINs do not match. Try again.'** + String get pinsMismatchRetry; + + /// No description provided for @pleaseEnter6Digits. + /// + /// In en, this message translates to: + /// **'Please enter 6 digits'** + String get pleaseEnter6Digits; + + /// No description provided for @setNewTpin. + /// + /// In en, this message translates to: + /// **'Set your new TPIN'** + String get setNewTpin; + + /// No description provided for @confirmNewTpin. + /// + /// In en, this message translates to: + /// **'Confirm your new TPIN'** + String get confirmNewTpin; + + /// No description provided for @tpinStatusFailed. + /// + /// In en, this message translates to: + /// **'Failed to check TPIN status'** + String get tpinStatusFailed; + + /// No description provided for @enter6DigitTpin. + /// + /// In en, this message translates to: + /// **'Please enter a 6-digit TPIN'** + String get enter6DigitTpin; + + /// No description provided for @tpin. + /// + /// In en, this message translates to: + /// **'TPIN'** + String get tpin; + + /// No description provided for @enterTpin. + /// + /// In en, this message translates to: + /// **'Enter your TPIN'** + String get enterTpin; + + /// No description provided for @transactionSuccess. + /// + /// In en, this message translates to: + /// **'Transaction Successful'** + String get transactionSuccess; + + /// No description provided for @on. + /// + /// In en, this message translates to: + /// **'On'** + String get on; + + /// No description provided for @toAccountNumber. + /// + /// In en, this message translates to: + /// **'To Account Number'** + String get toAccountNumber; + + /// No description provided for @shareText. + /// + /// In en, this message translates to: + /// **'Share'** + String get shareText; + + /// No description provided for @enableFingerprintLogin. + /// + /// In en, this message translates to: + /// **'Enable Fingerprint Login?'** + String get enableFingerprintLogin; + + /// No description provided for @enableFingerprintMessage. + /// + /// In en, this message translates to: + /// **'Would you like to enable fingerprint authentication for faster login?'** + String get enableFingerprintMessage; + + /// No description provided for @no. + /// + /// In en, this message translates to: + /// **'No'** + String get no; + + /// No description provided for @yes. + /// + /// In en, this message translates to: + /// **'Yes'** + String get yes; + + /// No description provided for @authenticateToEnable. + /// + /// In en, this message translates to: + /// **'Authenticate to enable fingerprint login'** + String get authenticateToEnable; + + /// No description provided for @exitApp. + /// + /// In en, this message translates to: + /// **'Exit App'** + String get exitApp; + + /// No description provided for @exitConfirmation. + /// + /// In en, this message translates to: + /// **'Do you really want to exit?'** + String get exitConfirmation; + + /// No description provided for @loading. + /// + /// In en, this message translates to: + /// **'Loading......'** + String get loading; + + /// No description provided for @enableFingerprintQuick. + /// + /// In en, this message translates to: + /// **'Enable fingerprint authentication for quick login?'** + String get enableFingerprintQuick; + + /// No description provided for @kccb. + /// + /// In en, this message translates to: + /// **'KCCB'** + String get kccb; + + /// No description provided for @password. + /// + /// In en, this message translates to: + /// **'Password'** + String get password; + + /// No description provided for @pleaseEnterUsername. + /// + /// In en, this message translates to: + /// **'Please enter your username'** + String get pleaseEnterUsername; + + /// No description provided for @pleaseEnterPassword. + /// + /// In en, this message translates to: + /// **'Please enter your password'** + String get pleaseEnterPassword; + + /// No description provided for @login. + /// + /// In en, this message translates to: + /// **'Login'** + String get login; + + /// No description provided for @or. + /// + /// In en, this message translates to: + /// **'OR'** + String get or; + + /// No description provided for @register. + /// + /// In en, this message translates to: + /// **'Register'** + String get register; + + /// No description provided for @authenticateToAccess. + /// + /// In en, this message translates to: + /// **'Authenticate to access kmobile'** + String get authenticateToAccess; + + /// No description provided for @incorrectMPIN. + /// + /// In en, this message translates to: + /// **'Incorrect mPIN. Try again.'** + String get incorrectMPIN; + + /// No description provided for @pleaseEnter4Digits. + /// + /// In en, this message translates to: + /// **'Please enter 4 digits.'** + String get pleaseEnter4Digits; + + /// No description provided for @enterMPIN. + /// + /// In en, this message translates to: + /// **'Enter your mPIN'** + String get enterMPIN; + + /// No description provided for @setMPIN. + /// + /// In en, this message translates to: + /// **'Set your mPIN'** + String get setMPIN; + + /// No description provided for @confirmMPIN. + /// + /// In en, this message translates to: + /// **'Confirm your mPIN'** + String get confirmMPIN; + + /// No description provided for @kconnect. + /// + /// In en, this message translates to: + /// **'Kconnect'** + String get kconnect; + + /// No description provided for @kccBankFull. + /// + /// In en, this message translates to: + /// **'Kangra Central Co-operative Bank'** + String get kccBankFull; +} + +class _AppLocalizationsDelegate + extends LocalizationsDelegate { + const _AppLocalizationsDelegate(); + + @override + Future load(Locale locale) { + return SynchronousFuture(lookupAppLocalizations(locale)); + } + + @override + bool isSupported(Locale locale) => + ['en', 'hi'].contains(locale.languageCode); + + @override + bool shouldReload(_AppLocalizationsDelegate old) => false; +} + +AppLocalizations lookupAppLocalizations(Locale locale) { + // Lookup logic when only language code is specified. + switch (locale.languageCode) { + case 'en': + return AppLocalizationsEn(); + case 'hi': + return AppLocalizationsHi(); + } + + throw FlutterError( + 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' + 'an issue with the localizations generation tool. Please file an issue ' + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' + 'that was used.'); +} diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart new file mode 100644 index 0000000..df7b4c9 --- /dev/null +++ b/lib/l10n/app_localizations_en.dart @@ -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'; +} diff --git a/lib/l10n/app_localizations_hi.dart b/lib/l10n/app_localizations_hi.dart new file mode 100644 index 0000000..401d7c9 --- /dev/null +++ b/lib/l10n/app_localizations_hi.dart @@ -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 => 'कांगड़ा सेंट्रल को-ऑपरेटिव बैंक'; +} diff --git a/pubspec.lock b/pubspec.lock index 65e3c80..c49ada3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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"