Compare commits
67 Commits
e6ea764785
...
sim-bindin
Author | SHA1 | Date | |
---|---|---|---|
f9fd74ea53 | |||
852f708633 | |||
de596aa138 | |||
720c6ec03a | |||
d081a5433c | |||
90f4a6bb81 | |||
|
f71c8d646b | ||
|
6a8f091ac5 | ||
|
596f0a96eb | ||
|
768d312066 | ||
|
4277ca9169 | ||
|
53caa5b7ae | ||
|
bfa0721e79 | ||
|
75bcce8201 | ||
|
99f4b1b735 | ||
|
6ebc96d153 | ||
|
6496aa95c0 | ||
|
e91efafa0e | ||
|
61a6e356d9 | ||
|
a48781ad1b | ||
|
d425af184e | ||
|
bc2c460f96 | ||
|
ef3556f207 | ||
|
6724d8bed0 | ||
|
83ed973b44 | ||
|
f7dd31fb93 | ||
|
9c60dc1c1c | ||
|
c369ad415d | ||
|
f934f0bff6 | ||
|
da0287ef38 | ||
|
f65507a706 | ||
9f6b35d3eb | |||
a33b4bc1e1 | |||
0d629226a8 | |||
6d502a0c81 | |||
96d1e37c42 | |||
b0610ad84d | |||
ceb29ee7fe | |||
57cb93c124 | |||
0ac9a1f319 | |||
d3ad68b25c | |||
|
eb0e1c120e | ||
a64e68d642 | |||
80faa06272 | |||
0bab68a2e6 | |||
|
351ee84414 | ||
|
f77549310a | ||
4b28a113d4 | |||
bf35ec61d5 | |||
180d3a3a60 | |||
|
737ce6cce6 | ||
|
e75f48aed5 | ||
|
5ee88403dd | ||
|
7fe8e8f084 | ||
|
59eb509dda | ||
|
5f41c6e7f4 | ||
|
36474786c1 | ||
|
df51c4f30b | ||
|
cf8588b336 | ||
04c992c934 | |||
fc76528206 | |||
7527db3d2f | |||
19d3487552 | |||
|
60a5703c35 | ||
09618db28e | |||
712553e49f | |||
842eef2cc7 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -41,3 +41,6 @@ app.*.map.json
|
||||
/android/app/debug
|
||||
/android/app/profile
|
||||
/android/app/release
|
||||
lib/l10n/app_localizations.dart
|
||||
lib/l10n/app_localizations_en.dart
|
||||
lib/l10n/app_localizations_hi.dart
|
||||
|
@@ -7,6 +7,9 @@
|
||||
|
||||
# The following line activates a set of recommended lints for Flutter apps,
|
||||
# packages, and plugins designed to encourage good coding practices.
|
||||
analyzer:
|
||||
errors:
|
||||
dead_code: ignore
|
||||
include: package:flutter_lints/flutter.yaml
|
||||
|
||||
linter:
|
||||
|
@@ -25,7 +25,7 @@ if (flutterVersionName == null) {
|
||||
android {
|
||||
namespace "com.example.kmobile"
|
||||
compileSdk flutter.compileSdkVersion
|
||||
ndkVersion flutter.ndkVersion
|
||||
ndkVersion "27.0.12077973"
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
@@ -53,9 +53,13 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
signingConfig signingConfigs.debug
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
|
||||
'proguard-rules.pro'
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
77
android/app/proguard-rules.pro
vendored
Normal file
77
android/app/proguard-rules.pro
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
# Keep Flutter embedding and plugin registrant (important)
|
||||
-keep class io.flutter.embedding.** { *; }
|
||||
-keep class io.flutter.plugins.** { *; }
|
||||
-keep class io.flutter.plugin.** { *; }
|
||||
-keep class io.flutter.app.** { *; }
|
||||
|
||||
# Keep Application / Activity if you customized them (replace with your package name)
|
||||
# -keep class com.yourcompany.yourapp.MainActivity { *; }
|
||||
# -keep class com.yourcompany.yourapp.** { *; }
|
||||
|
||||
# Keep classes referenced from AndroidManifest via reflection or lifecycle
|
||||
-keepclassmembers class * {
|
||||
@android.webkit.JavascriptInterface <methods>;
|
||||
public <init>(android.content.Context, ...);
|
||||
}
|
||||
|
||||
# Keep native entry points (JNI) if any (example)
|
||||
-keepclasseswithmembernames class * {
|
||||
native <methods>;
|
||||
}
|
||||
|
||||
# Keep classes that use reflection heavily (OKHttp/Retrofit/Gson)
|
||||
# Retrofit/OkHttp
|
||||
-keep class okhttp3.** { *; }
|
||||
-keep interface okhttp3.** { *; }
|
||||
-keep class retrofit2.** { *; }
|
||||
-keep interface retrofit2.** { *; }
|
||||
|
||||
# Gson (models accessed by reflection)
|
||||
-keep class com.google.gson.** { *; }
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
|
||||
# Keep Firebase (if you use it)
|
||||
-keep class com.google.firebase.** { *; }
|
||||
-keep class com.google.android.gms.** { *; }
|
||||
|
||||
# WorkManager (if used)
|
||||
-keep class androidx.work.impl.background.systemjob.SystemJobService { *; }
|
||||
-keep class androidx.work.** { *; }
|
||||
|
||||
# Room/DB entities - if you use Room, keep annotations and entity classes
|
||||
-keepclassmembers class * {
|
||||
@androidx.room.* <fields>;
|
||||
}
|
||||
-keep class androidx.room.** { *; }
|
||||
|
||||
# Keep classes loaded by reflection (e.g. through Class.forName)
|
||||
-keepclassmembers,includedescriptorclasses class * {
|
||||
public static <fields>;
|
||||
public <init>(...);
|
||||
}
|
||||
|
||||
# Keep Kotlin metadata (for Kotlin reflection)
|
||||
-keep class kotlin.Metadata { *; }
|
||||
|
||||
# Keep names of classes annotated with @Keep
|
||||
-keep @androidx.annotation.Keep class * { *; }
|
||||
-keepclassmembers class * {
|
||||
@androidx.annotation.Keep *;
|
||||
}
|
||||
|
||||
# If using Gson TypeAdapterFactory via reflection
|
||||
-keepclassmembers class * {
|
||||
static ** typeAdapterFactory*(...);
|
||||
}
|
||||
|
||||
# Don't remove debug/logging if you want (optional)
|
||||
#-keep class android.util.Log { *; }
|
||||
|
||||
# Keep any generated plugin registrant classes if present (older projects)
|
||||
-keep class io.flutter.plugins.GeneratedPluginRegistrant { *; }
|
||||
|
||||
# (Optional) Keep parcelable implementations if those are serialized dynamically
|
||||
-keep class * implements android.os.Parcelable {
|
||||
public static final android.os.Parcelable$Creator *;
|
||||
}
|
BIN
assets/images/boi_logo.png
Normal file
BIN
assets/images/boi_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.4 KiB |
@@ -1,3 +1,5 @@
|
||||
// ignore_for_file: unused_local_variable
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import '../../data/repositories/auth_repository.dart';
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:kmobile/data/models/ifsc.dart';
|
||||
import 'package:kmobile/data/models/beneficiary.dart';
|
||||
@@ -102,8 +101,21 @@ class BeneficiaryService {
|
||||
throw Exception("Failed to fetch beneficiaries");
|
||||
}
|
||||
} catch (e) {
|
||||
print("Error fetching beneficiaries: $e");
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> deleteBeneficiary(String accountNo) async {
|
||||
try {
|
||||
final response = await _dio.delete('/api/beneficiary/$accountNo');
|
||||
|
||||
if (response.statusCode != 204) {
|
||||
throw Exception('Failed to delete beneficiary');
|
||||
}
|
||||
} on DioException catch (e) {
|
||||
throw Exception('Network error: ${e.message}');
|
||||
} catch (e) {
|
||||
throw Exception('Unexpected error: ${e.toString()}');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -2,17 +2,17 @@ import 'package:dio/dio.dart';
|
||||
import 'package:kmobile/data/models/imps_response.dart';
|
||||
import 'package:kmobile/data/models/imps_transaction.dart';
|
||||
|
||||
class RtgsService {
|
||||
class ImpsService {
|
||||
final Dio _dio;
|
||||
|
||||
RtgsService(this._dio);
|
||||
ImpsService(this._dio);
|
||||
|
||||
Future<ImpsResponse> processImpsTransaction(
|
||||
ImpsTransaction transaction) async {
|
||||
try {
|
||||
await Future.delayed(const Duration(seconds: 3));
|
||||
final response = await _dio.post(
|
||||
'/api/payment/rtgs',
|
||||
'/api/payment/imps',
|
||||
data: transaction.toJson(),
|
||||
);
|
||||
|
||||
@@ -20,7 +20,7 @@ class RtgsService {
|
||||
return ImpsResponse.fromJson(response.data);
|
||||
} else {
|
||||
throw Exception(
|
||||
'RTGS transaction failed with status code: ${response.statusCode}');
|
||||
'IMPS transaction failed with status code: ${response.statusCode}');
|
||||
}
|
||||
} on DioException {
|
||||
rethrow;
|
||||
|
@@ -1,3 +1,5 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:kmobile/data/models/neft_response.dart';
|
||||
import 'package:kmobile/data/models/neft_transaction.dart';
|
||||
@@ -23,6 +25,7 @@ class NeftService {
|
||||
'NEFT transaction failed with status code: ${response.statusCode}');
|
||||
}
|
||||
} on DioException {
|
||||
log('DioException Occured');
|
||||
rethrow;
|
||||
} catch (e) {
|
||||
throw Exception('An unexpected error occurred: ${e.toString()}');
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:kmobile/data/models/payment_response.dart';
|
||||
import 'package:kmobile/data/models/transfer.dart';
|
||||
|
92
lib/app.dart
92
lib/app.dart
@@ -11,7 +11,7 @@ import 'config/routes.dart';
|
||||
import 'di/injection.dart';
|
||||
import 'features/auth/controllers/auth_cubit.dart';
|
||||
import 'features/card/screens/card_management_screen.dart';
|
||||
import 'features/auth/screens/welcome_screen.dart';
|
||||
import 'features/auth/screens/splash_screen.dart';
|
||||
import 'features/auth/screens/login_screen.dart';
|
||||
import 'features/service/screens/service_screen.dart';
|
||||
import 'features/dashboard/screens/dashboard_screen.dart';
|
||||
@@ -40,7 +40,7 @@ class _KMobileState extends State<KMobile> {
|
||||
void initState() {
|
||||
super.initState();
|
||||
loadPreferences();
|
||||
Future.delayed(const Duration(seconds: 2), () {
|
||||
Future.delayed(const Duration(seconds: 3), () {
|
||||
setState(() {
|
||||
showSplash = false;
|
||||
});
|
||||
@@ -67,7 +67,6 @@ class _KMobileState extends State<KMobile> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// Set status bar color and brightness
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
const SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
@@ -82,7 +81,6 @@ class _KMobileState extends State<KMobile> {
|
||||
],
|
||||
child: BlocBuilder<ThemeCubit, ThemeState>(
|
||||
builder: (context, themeState) {
|
||||
print('global theme state changed');
|
||||
return MaterialApp(
|
||||
debugShowCheckedModeBanner: false,
|
||||
locale: _locale ?? const Locale('en'),
|
||||
@@ -98,8 +96,8 @@ class _KMobileState extends State<KMobile> {
|
||||
],
|
||||
title: 'kMobile',
|
||||
theme: themeState.getThemeData(),
|
||||
darkTheme: themeState.getThemeData(),
|
||||
themeMode: ThemeMode.system,
|
||||
//darkTheme: themeState.getThemeData(),
|
||||
themeMode: ThemeMode.light,
|
||||
onGenerateRoute: AppRoutes.generateRoute,
|
||||
initialRoute: AppRoutes.splash,
|
||||
home: showSplash ? const SplashScreen() : const AuthGate(),
|
||||
@@ -120,7 +118,6 @@ class AuthGate extends StatefulWidget {
|
||||
class _AuthGateState extends State<AuthGate> {
|
||||
bool _checking = true;
|
||||
bool _isLoggedIn = false;
|
||||
bool _showWelcome = true;
|
||||
bool _hasMPin = false;
|
||||
bool _biometricEnabled = false;
|
||||
bool _biometricTried = false;
|
||||
@@ -153,9 +150,13 @@ class _AuthGateState extends State<AuthGate> {
|
||||
final localAuth = LocalAuthentication();
|
||||
final canCheck = await localAuth.canCheckBiometrics;
|
||||
if (!canCheck) return false;
|
||||
String localizedReason = "";
|
||||
if (mounted) {
|
||||
localizedReason = AppLocalizations.of(context).authenticateToAccess;
|
||||
}
|
||||
try {
|
||||
final didAuth = await localAuth.authenticate(
|
||||
localizedReason: AppLocalizations.of(context).authenticateToAccess,
|
||||
localizedReason: localizedReason,
|
||||
options: const AuthenticationOptions(
|
||||
stickyAuth: true,
|
||||
biometricOnly: true,
|
||||
@@ -172,18 +173,7 @@ class _AuthGateState extends State<AuthGate> {
|
||||
if (_checking) {
|
||||
return const SplashScreen();
|
||||
}
|
||||
// ✅ Step 1: Show welcome screen first, only once
|
||||
if (_showWelcome) {
|
||||
return WelcomeScreen(
|
||||
onContinue: () {
|
||||
setState(() {
|
||||
_showWelcome = false;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// ✅ Step 2: Check login status
|
||||
if (_isLoggedIn) {
|
||||
if (_hasMPin) {
|
||||
if (_biometricEnabled) {
|
||||
@@ -198,7 +188,6 @@ class _AuthGateState extends State<AuthGate> {
|
||||
return const NavigationScaffold(); // Authenticated
|
||||
}
|
||||
|
||||
// ❌ Biometric failed → Show MPIN screen
|
||||
return MPinScreen(
|
||||
mode: MPinMode.enter,
|
||||
onCompleted: (_) {
|
||||
@@ -224,7 +213,6 @@ class _AuthGateState extends State<AuthGate> {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// No MPIN set → show MPIN set screen + biometric dialog
|
||||
return MPinScreen(
|
||||
mode: MPinMode.set,
|
||||
onCompleted: (_) async {
|
||||
@@ -255,11 +243,14 @@ class _AuthGateState extends State<AuthGate> {
|
||||
if (optIn == true) {
|
||||
final canCheck = await localAuth.canCheckBiometrics;
|
||||
bool didAuth = false;
|
||||
String authEnable = "";
|
||||
if (context.mounted) {
|
||||
authEnable = AppLocalizations.of(context).authenticateToEnable;
|
||||
}
|
||||
|
||||
if (canCheck) {
|
||||
didAuth = await localAuth.authenticate(
|
||||
localizedReason:
|
||||
AppLocalizations.of(context).authenticateToEnable,
|
||||
localizedReason: authEnable,
|
||||
options: const AuthenticationOptions(
|
||||
stickyAuth: true,
|
||||
biometricOnly: true,
|
||||
@@ -272,17 +263,17 @@ class _AuthGateState extends State<AuthGate> {
|
||||
}
|
||||
}
|
||||
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => const NavigationScaffold(),
|
||||
),
|
||||
);
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => const NavigationScaffold(),
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// ✅ Step 3: If not logged in, show login screen
|
||||
return const LoginScreen();
|
||||
}
|
||||
}
|
||||
@@ -304,17 +295,8 @@ class _NavigationScaffoldState extends State<NavigationScaffold> {
|
||||
const ServiceScreen(),
|
||||
];
|
||||
|
||||
void _onItemTapped(int index) {
|
||||
setState(() {
|
||||
_selectedIndex = index;
|
||||
});
|
||||
_pageController.jumpToPage(index);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print(
|
||||
"--- NavigationScaffold is rebuilding with theme color: ${Theme.of(context).primaryColor}");
|
||||
return PopScope(
|
||||
canPop: false,
|
||||
onPopInvokedWithResult: (didPop, result) async {
|
||||
@@ -383,29 +365,6 @@ class _NavigationScaffoldState extends State<NavigationScaffold> {
|
||||
}
|
||||
}
|
||||
|
||||
class SplashScreen extends StatelessWidget {
|
||||
const SplashScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const CircularProgressIndicator(),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
AppLocalizations.of(context).loading,
|
||||
style: Theme.of(context).textTheme.headlineMedium,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Add this widget at the end of the file
|
||||
class BiometricPromptScreen extends StatelessWidget {
|
||||
final VoidCallback onCompleted;
|
||||
@@ -418,8 +377,12 @@ class BiometricPromptScreen extends StatelessWidget {
|
||||
onCompleted();
|
||||
return;
|
||||
}
|
||||
String localizedReason = "";
|
||||
if (context.mounted) {
|
||||
localizedReason = AppLocalizations.of(context).enableFingerprintQuick;
|
||||
}
|
||||
final didAuth = await localAuth.authenticate(
|
||||
localizedReason: AppLocalizations.of(context).enableFingerprintQuick,
|
||||
localizedReason: localizedReason,
|
||||
options: const AuthenticationOptions(
|
||||
stickyAuth: true,
|
||||
biometricOnly: true,
|
||||
@@ -463,6 +426,9 @@ class BiometricPromptScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
);
|
||||
if (!context.mounted) {
|
||||
return;
|
||||
}
|
||||
if (result == true) {
|
||||
await _handleBiometric(context);
|
||||
} else {
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kmobile/features/auth/screens/mpin_screen.dart';
|
||||
import 'package:kmobile/features/auth/screens/splash_screen.dart';
|
||||
import '../app.dart';
|
||||
import '../features/auth/screens/login_screen.dart';
|
||||
// import '../features/auth/screens/forgot_password_screen.dart';
|
||||
|
@@ -1,32 +1,39 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'theme_type.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
|
||||
class AppThemes {
|
||||
static ThemeData getLightTheme(ThemeType type) {
|
||||
final Color seedColor;
|
||||
switch (type) {
|
||||
case ThemeType.green:
|
||||
return ThemeData(primarySwatch: Colors.green);
|
||||
seedColor = Colors.green;
|
||||
break;
|
||||
case ThemeType.orange:
|
||||
return ThemeData(primarySwatch: Colors.orange);
|
||||
seedColor = Colors.orange;
|
||||
break;
|
||||
case ThemeType.blue:
|
||||
return ThemeData(primarySwatch: Colors.blue);
|
||||
seedColor = Colors.blue;
|
||||
break;
|
||||
case ThemeType.violet:
|
||||
default:
|
||||
return ThemeData(primarySwatch: Colors.deepPurple);
|
||||
seedColor = Colors.deepPurple;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static ThemeData getDarkTheme(ThemeType type) {
|
||||
switch (type) {
|
||||
case ThemeType.green:
|
||||
return ThemeData.dark().copyWith(primaryColor: Colors.green);
|
||||
case ThemeType.orange:
|
||||
return ThemeData.dark().copyWith(primaryColor: Colors.orange);
|
||||
case ThemeType.blue:
|
||||
return ThemeData.dark().copyWith(primaryColor: Colors.blue);
|
||||
case ThemeType.violet:
|
||||
default:
|
||||
return ThemeData.dark().copyWith(primaryColor: Colors.deepPurple);
|
||||
}
|
||||
final colorScheme = ColorScheme.fromSeed(
|
||||
seedColor: seedColor,
|
||||
brightness: Brightness.light, // Explicitly set for a light theme
|
||||
);
|
||||
|
||||
return ThemeData.from(
|
||||
colorScheme: colorScheme,
|
||||
useMaterial3: true, // Recommended for modern Flutter apps
|
||||
textTheme: GoogleFonts.rubikTextTheme())
|
||||
.copyWith(
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
bottomNavigationBarTheme: BottomNavigationBarThemeData(
|
||||
backgroundColor: colorScheme.surface,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -1,5 +1,3 @@
|
||||
// ignore_for_file: non_constant_identifier_names
|
||||
|
||||
class Beneficiary {
|
||||
final String accountNo;
|
||||
final String accountType;
|
||||
@@ -53,7 +51,6 @@ class Beneficiary {
|
||||
final beneficiaryList = jsonList
|
||||
.map((beneficiary) => Beneficiary.fromJson(beneficiary))
|
||||
.toList();
|
||||
print(beneficiaryList);
|
||||
return beneficiaryList;
|
||||
}
|
||||
|
||||
|
@@ -19,13 +19,12 @@ class ImpsTransaction {
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'stFromAccDetails': fromAccount,
|
||||
'stBenAccNo': toAccount,
|
||||
'stTransferAmount': amount,
|
||||
'stBenIFSC': ifscCode,
|
||||
//'remitterName': remitterName,
|
||||
'stBeneName': beneficiaryName,
|
||||
'stRemarks': "Check",
|
||||
'fromAccount': fromAccount,
|
||||
'toAccount': toAccount,
|
||||
'amount': amount,
|
||||
'ifscCode': ifscCode,
|
||||
'remitterName': remitterName,
|
||||
'beneficiaryName': beneficiaryName,
|
||||
'tpin': tpin,
|
||||
};
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import 'package:kmobile/api/services/rtgs_service.dart';
|
||||
import 'package:kmobile/api/services/neft_service.dart';
|
||||
import 'package:kmobile/api/services/imps_service.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:kmobile/api/services/beneficiary_service.dart';
|
||||
@@ -44,6 +45,7 @@ Future<void> setupDependencies() async {
|
||||
getIt.registerSingleton<BeneficiaryService>(BeneficiaryService(getIt<Dio>()));
|
||||
getIt.registerSingleton<NeftService>(NeftService(getIt<Dio>()));
|
||||
getIt.registerSingleton<RtgsService>(RtgsService(getIt<Dio>()));
|
||||
getIt.registerSingleton<ImpsService>(ImpsService(getIt<Dio>()));
|
||||
|
||||
// Add auth interceptor after repository is available
|
||||
getIt<Dio>().interceptors.add(
|
||||
|
@@ -1,7 +1,5 @@
|
||||
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 '../../../l10n/app_localizations.dart';
|
||||
|
||||
class AccountInfoScreen extends StatefulWidget {
|
||||
@@ -32,35 +30,9 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
|
||||
int selectedIndex = widget.selectedIndex;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: IconButton(
|
||||
icon: const Icon(Symbols.arrow_back_ios_new),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
title: Text(
|
||||
AppLocalizations.of(context).accountInfo,
|
||||
style: const TextStyle(
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
centerTitle: false,
|
||||
actions: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10.0),
|
||||
child: CircleAvatar(
|
||||
backgroundColor: Colors.grey[200],
|
||||
radius: 20,
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/avatar_male.svg',
|
||||
width: 40,
|
||||
height: 40,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
@@ -70,7 +42,6 @@ class _AccountInfoScreen extends State<AccountInfoScreen> {
|
||||
style: const TextStyle(fontWeight: FontWeight.w500, fontSize: 14),
|
||||
),
|
||||
|
||||
/// Dropdown to change account
|
||||
DropdownButton<User>(
|
||||
value: selectedUser,
|
||||
onChanged: (User? newUser) {
|
||||
@@ -130,6 +101,7 @@ class InfoRow extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
margin: const EdgeInsets.symmetric(vertical: 8),
|
||||
@@ -138,16 +110,16 @@ class InfoRow extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.black87,
|
||||
color: theme.colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 3),
|
||||
Text(
|
||||
value,
|
||||
style: const TextStyle(fontSize: 16, color: Colors.black),
|
||||
style: TextStyle(fontSize: 16, color: theme.colorScheme.onSurface),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@@ -10,7 +10,12 @@ import 'transaction_details_screen.dart';
|
||||
|
||||
class AccountStatementScreen extends StatefulWidget {
|
||||
final String accountNo;
|
||||
const AccountStatementScreen({super.key, required this.accountNo});
|
||||
final String balance;
|
||||
const AccountStatementScreen({
|
||||
super.key,
|
||||
required this.accountNo,
|
||||
required this.balance,
|
||||
});
|
||||
|
||||
@override
|
||||
State<AccountStatementScreen> createState() => _AccountStatementScreen();
|
||||
@@ -150,7 +155,7 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
Text(
|
||||
"${AppLocalizations.of(context).accountNumber}: ",
|
||||
style: const TextStyle(
|
||||
fontSize: 19,
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
@@ -158,6 +163,19 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
"${AppLocalizations.of(context).availableBalance}: ",
|
||||
style: const TextStyle(
|
||||
fontSize: 17,
|
||||
),
|
||||
),
|
||||
Text(' ₹ ${widget.balance}',
|
||||
style: const TextStyle(fontSize: 17)),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
Text(
|
||||
AppLocalizations.of(context).filters,
|
||||
style: const TextStyle(fontSize: 17),
|
||||
@@ -196,7 +214,7 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
),
|
||||
child: Text(
|
||||
"Search",
|
||||
AppLocalizations.of(context).search,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
fontSize: 16,
|
||||
@@ -262,7 +280,7 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
fontSize: 16, color: Colors.grey[600]),
|
||||
),
|
||||
)
|
||||
: ListView.builder(
|
||||
: ListView.separated(
|
||||
itemCount: _transactions.length,
|
||||
itemBuilder: (context, index) {
|
||||
final tx = _transactions[index];
|
||||
@@ -275,20 +293,20 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
tx.type == 'CR' ? Colors.green : Colors.red,
|
||||
),
|
||||
title: Text(
|
||||
tx.date ?? '',
|
||||
style: const TextStyle(fontSize: 15),
|
||||
),
|
||||
subtitle: Text(
|
||||
tx.name != null
|
||||
? (tx.name!.length > 18
|
||||
? tx.name!.substring(0, 22)
|
||||
: 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),
|
||||
style: const TextStyle(fontSize: 17),
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@@ -301,6 +319,9 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
},
|
||||
);
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return const Divider();
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@@ -11,34 +11,6 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final bool isCredit = transaction.type?.toUpperCase() == 'CR';
|
||||
|
||||
// Future<void> _shareScreenshot() async {
|
||||
// try {
|
||||
// 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);
|
||||
// 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,
|
||||
// );
|
||||
// } catch (e) {
|
||||
// if (!mounted) return;
|
||||
// ScaffoldMessenger.of(context).showSnackBar(
|
||||
// SnackBar(
|
||||
// content: Text(
|
||||
// '${AppLocalizations.of(context).failedToShareScreenshot}: $e',
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
return Scaffold(
|
||||
appBar:
|
||||
AppBar(title: Text(AppLocalizations.of(context).transactionDetails)),
|
||||
@@ -46,7 +18,6 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
children: [
|
||||
// Absolute center for amount + icon + date + details
|
||||
Expanded(
|
||||
flex: 3,
|
||||
child: Center(
|
||||
@@ -86,17 +57,12 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
const Divider(),
|
||||
|
||||
// All details
|
||||
Expanded(
|
||||
flex: 5,
|
||||
child: ListView(
|
||||
children: [
|
||||
// ignore: unnecessary_cast
|
||||
_buildDetailRow(
|
||||
AppLocalizations.of(context).transactionType as String,
|
||||
_buildDetailRow(AppLocalizations.of(context).transactionType,
|
||||
transaction.type ?? ""),
|
||||
_buildDetailRow(AppLocalizations.of(context).transferType,
|
||||
transaction.name.split("/").first ?? ""),
|
||||
@@ -110,30 +76,6 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
// ElevatedButton.icon(
|
||||
// onPressed: _shareScreenshot,
|
||||
// icon: Icon(
|
||||
// Icons.share_rounded,
|
||||
// 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,
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 12),
|
||||
// shape: RoundedRectangleBorder(
|
||||
// side: BorderSide(color: Theme.of(context).primaryColor, width: 1),
|
||||
// borderRadius: BorderRadius.circular(30),
|
||||
// ),
|
||||
// textStyle: const TextStyle(
|
||||
// fontSize: 18,
|
||||
// fontWeight: FontWeight.w600,
|
||||
// color: Colors.black,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -151,14 +93,14 @@ class TransactionDetailsScreen extends StatelessWidget {
|
||||
"$label: ",
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 20,
|
||||
fontSize: 17,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Expanded(
|
||||
child: Text(
|
||||
value,
|
||||
style: const TextStyle(fontSize: 20),
|
||||
style: const TextStyle(fontSize: 16),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@@ -1,3 +1,5 @@
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:kmobile/config/theme_type.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@@ -17,7 +19,7 @@ class ThemeCubit extends Cubit<ThemeState> {
|
||||
}
|
||||
|
||||
Future<void> changeTheme(ThemeType type) async {
|
||||
print("Attempting to change theme to: ${type.toString()}");
|
||||
log("Attempting to change theme...");
|
||||
final prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setInt('theme_type', type.index);
|
||||
emit(ThemeState(themeType: type));
|
||||
|
@@ -23,23 +23,9 @@ class LoginScreenState extends State<LoginScreen>
|
||||
final _passwordController = TextEditingController();
|
||||
bool _obscurePassword = true;
|
||||
//bool _showWelcome = true;
|
||||
late AnimationController _logoController;
|
||||
late Animation<double> _logoAnimation;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_logoController = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(seconds: 1),
|
||||
)..repeat(reverse: true);
|
||||
|
||||
_logoAnimation = Tween<double>(begin: 0.2, end: 1).animate(_logoController);
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_logoController.dispose();
|
||||
_customerNumberController.dispose();
|
||||
_passwordController.dispose();
|
||||
super.dispose();
|
||||
@@ -63,8 +49,8 @@ class LoginScreenState extends State<LoginScreen>
|
||||
if (state is Authenticated) {
|
||||
final storage = getIt<SecureStorage>();
|
||||
final mpin = await storage.read('mpin');
|
||||
if (!context.mounted) return;
|
||||
if (mpin == null) {
|
||||
// ignore: use_build_context_synchronously
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => MPinScreen(
|
||||
@@ -83,7 +69,6 @@ class LoginScreenState extends State<LoginScreen>
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// ignore: use_build_context_synchronously
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute(builder: (_) => const NavigationScaffold()),
|
||||
);
|
||||
@@ -102,21 +87,17 @@ class LoginScreenState extends State<LoginScreen>
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
// 🔁 Animated Blinking Logo
|
||||
FadeTransition(
|
||||
opacity: _logoAnimation,
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
return Icon(
|
||||
Icons.account_balance,
|
||||
size: 100,
|
||||
color: Theme.of(context).primaryColor,
|
||||
);
|
||||
},
|
||||
),
|
||||
Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 150,
|
||||
height: 150,
|
||||
errorBuilder: (context, error, stackTrace) {
|
||||
return Icon(
|
||||
Icons.account_balance,
|
||||
size: 100,
|
||||
color: Theme.of(context).primaryColor,
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
// Title
|
||||
@@ -161,8 +142,7 @@ class LoginScreenState extends State<LoginScreen>
|
||||
controller: _passwordController,
|
||||
obscureText: _obscurePassword,
|
||||
textInputAction: TextInputAction.done,
|
||||
onFieldSubmitted: (_) =>
|
||||
_submitForm(), // ⌨️ Enter key submits
|
||||
onFieldSubmitted: (_) => _submitForm(),
|
||||
decoration: InputDecoration(
|
||||
labelText: AppLocalizations.of(context).password,
|
||||
border: const OutlineInputBorder(),
|
||||
|
@@ -1,70 +1,51 @@
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'dart:async';
|
||||
|
||||
class WelcomeScreen extends StatefulWidget {
|
||||
final VoidCallback onContinue;
|
||||
|
||||
const WelcomeScreen({super.key, required this.onContinue});
|
||||
class SplashScreen extends StatefulWidget {
|
||||
const SplashScreen({super.key});
|
||||
|
||||
@override
|
||||
State<WelcomeScreen> createState() => _WelcomeScreenState();
|
||||
State<SplashScreen> createState() => _SplashScreenState();
|
||||
}
|
||||
|
||||
class _WelcomeScreenState extends State<WelcomeScreen> {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
|
||||
// Automatically go to logizn after 4 seconds
|
||||
Timer(const Duration(seconds: 4), () {
|
||||
widget.onContinue();
|
||||
});
|
||||
}
|
||||
|
||||
class _SplashScreenState extends State<SplashScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: Stack(
|
||||
children: [
|
||||
/// 🔹 Background Image
|
||||
Positioned.fill(
|
||||
child: Image.asset(
|
||||
'assets/images/kconnect2.webp',
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
|
||||
/// 🔹 Centered Text Overlay
|
||||
Center(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
AppLocalizations.of(context).kconnect,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 36,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Theme.of(context).dialogBackgroundColor,
|
||||
letterSpacing: 1.5,
|
||||
color: Color(0xFFFFFFFF),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
AppLocalizations.of(context).kccBankFull,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
color: Theme.of(context).dialogBackgroundColor,
|
||||
color: Color(0xFFFFFFFF),
|
||||
letterSpacing: 1.2,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
/// 🔹 Loading Spinner at Bottom
|
||||
Positioned(
|
||||
bottom: 40,
|
||||
left: 0,
|
@@ -46,7 +46,7 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
setState(() {
|
||||
accountType = AppLocalizations.of(context).savings;
|
||||
accountType = 'Savings';
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -87,11 +87,17 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
|
||||
final service = getIt<BeneficiaryService>();
|
||||
try {
|
||||
final String beneficiaryName = await service.validateBeneficiary(
|
||||
accountNo: accountNo,
|
||||
ifscCode: ifsc,
|
||||
remitterName: remitter,
|
||||
);
|
||||
String beneficiaryName;
|
||||
if (ifsc.toLowerCase().contains('kace')) {
|
||||
beneficiaryName =
|
||||
await service.validateBeneficiaryWithinBank(accountNo);
|
||||
} else {
|
||||
beneficiaryName = await service.validateBeneficiary(
|
||||
accountNo: accountNo,
|
||||
ifscCode: ifsc,
|
||||
remitterName: remitter,
|
||||
);
|
||||
}
|
||||
|
||||
setState(() {
|
||||
nameController.text = beneficiaryName;
|
||||
@@ -121,8 +127,9 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
// Ensure beneficiary is validated before proceeding to TPIN
|
||||
if (!_isBeneficiaryValidated) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('Please validate beneficiary details first.')),
|
||||
SnackBar(
|
||||
content: Text(AppLocalizations.of(context)
|
||||
.pleaseValidateBeneficiaryDetailsFirst)),
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -509,8 +516,8 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
),
|
||||
),
|
||||
items: [
|
||||
AppLocalizations.of(context).savings,
|
||||
AppLocalizations.of(context).current,
|
||||
'Savings',
|
||||
'Current',
|
||||
]
|
||||
.map(
|
||||
(type) => DropdownMenuItem(
|
||||
@@ -569,9 +576,6 @@ class _AddBeneficiaryScreen extends State<AddBeneficiaryScreen> {
|
||||
style: ElevatedButton.styleFrom(
|
||||
shape: const StadiumBorder(),
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
backgroundColor: Theme.of(context).primaryColorDark,
|
||||
foregroundColor:
|
||||
Theme.of(context).scaffoldBackgroundColor,
|
||||
),
|
||||
child: Text(AppLocalizations.of(context).validateAndAdd),
|
||||
),
|
||||
|
@@ -0,0 +1,161 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kmobile/data/models/beneficiary.dart';
|
||||
import 'package:kmobile/di/injection.dart';
|
||||
import 'package:kmobile/widgets/bank_logos.dart';
|
||||
import 'package:kmobile/api/services/beneficiary_service.dart';
|
||||
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
class BeneficiaryDetailsScreen extends StatelessWidget {
|
||||
final Beneficiary beneficiary;
|
||||
|
||||
BeneficiaryDetailsScreen({super.key, required this.beneficiary});
|
||||
|
||||
final service = getIt<BeneficiaryService>();
|
||||
|
||||
void _deleteBeneficiary(BuildContext context) async {
|
||||
try {
|
||||
await service.deleteBeneficiary(beneficiary.accountNo);
|
||||
if (!context.mounted) {
|
||||
return;
|
||||
}
|
||||
_showSuccessDialog(context);
|
||||
} catch (e) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text('Failed to delete beneficiary: $e')),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void _showSuccessDialog(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: const Text('Success'),
|
||||
content: const Text('Beneficiary deleted successfully.'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
child: const Text('OK'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).popUntil((route) => route.isFirst);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void _showDeleteConfirmationDialog(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: const Text('Delete Beneficiary'),
|
||||
content:
|
||||
const Text('Are you sure you want to delete this beneficiary?'),
|
||||
actions: <Widget>[
|
||||
TextButton(
|
||||
child: const Text('Cancel'),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
child: const Text('Delete'),
|
||||
onPressed: () {
|
||||
//Navigator.of(context).pop();
|
||||
_deleteBeneficiary(context);
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context).beneficiarydetails),
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 24,
|
||||
backgroundColor: Colors.transparent,
|
||||
child: getBankLogo(beneficiary.bankName),
|
||||
),
|
||||
const SizedBox(width: 16),
|
||||
Text(
|
||||
beneficiary.name,
|
||||
style: const TextStyle(
|
||||
fontSize: 20, fontWeight: FontWeight.bold),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
_buildDetailRow('${AppLocalizations.of(context).bankName} ',
|
||||
beneficiary.bankName ?? 'N/A'),
|
||||
_buildDetailRow('${AppLocalizations.of(context).accountNumber} ',
|
||||
beneficiary.accountNo),
|
||||
_buildDetailRow('${AppLocalizations.of(context).accountType} ',
|
||||
beneficiary.accountType),
|
||||
_buildDetailRow('${AppLocalizations.of(context).ifscCode} ',
|
||||
beneficiary.ifscCode),
|
||||
_buildDetailRow('${AppLocalizations.of(context).branchName} ',
|
||||
beneficiary.branchName ?? 'N/A'),
|
||||
const Spacer(),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
// ElevatedButton.icon(
|
||||
// onPressed: () {
|
||||
// // Set Transaction Limit for this beneficiary
|
||||
// },
|
||||
// icon: const Icon(Icons.currency_rupee),
|
||||
// label: const Text('Set Limit'),
|
||||
// ),
|
||||
ElevatedButton.icon(
|
||||
onPressed: () {
|
||||
// Delete beneficiary option
|
||||
_showDeleteConfirmationDialog(context);
|
||||
},
|
||||
icon: const Icon(Icons.delete),
|
||||
label: Text(AppLocalizations.of(context).delete),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildDetailRow(String label, String value) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(label, style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
const SizedBox(width: 16),
|
||||
Flexible(
|
||||
child: Text(
|
||||
value,
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@@ -1,10 +1,12 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kmobile/data/models/beneficiary.dart';
|
||||
import 'package:kmobile/features/beneficiaries/screens/add_beneficiary_screen.dart';
|
||||
import 'package:kmobile/features/beneficiaries/screens/beneficiary_details_screen.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
import '../../../di/injection.dart';
|
||||
import 'package:kmobile/api/services/beneficiary_service.dart';
|
||||
import 'package:shimmer/shimmer.dart';
|
||||
import 'package:kmobile/widgets/bank_logos.dart';
|
||||
|
||||
class ManageBeneficiariesScreen extends StatefulWidget {
|
||||
final String customerName;
|
||||
@@ -60,80 +62,6 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _getBankLogo(String? bankName) {
|
||||
if (bankName != null && bankName.toLowerCase().contains('state bank of')) {
|
||||
return Image.asset(
|
||||
'assets/images/sbi_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('kangra central')) {
|
||||
return Image.asset(
|
||||
'assets/images/icon.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('hdfc bank ltd')) {
|
||||
return Image.asset(
|
||||
'assets/images/hdfc_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('icici bank ltd')) {
|
||||
return Image.asset(
|
||||
'assets/images/icici_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null &&
|
||||
bankName.toLowerCase().contains('punjab national bank')) {
|
||||
return Image.asset(
|
||||
'assets/images/pnb_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('axis')) {
|
||||
return Image.asset(
|
||||
'assets/images/axisBank_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('baroda')) {
|
||||
return Image.asset(
|
||||
'assets/images/bankofBaroda_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('canara bank')) {
|
||||
return Image.asset(
|
||||
'assets/images/canaraBank_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('kotak')) {
|
||||
return Image.asset(
|
||||
'assets/images/kotak_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
else {
|
||||
return const Icon(
|
||||
Icons.account_balance,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildBeneficiaryList() {
|
||||
if (_beneficiaries.isEmpty) {
|
||||
return Center(
|
||||
@@ -147,7 +75,7 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
|
||||
leading: CircleAvatar(
|
||||
radius: 24,
|
||||
backgroundColor: Colors.transparent,
|
||||
child: _getBankLogo(item.bankName),
|
||||
child: getBankLogo(item.bankName),
|
||||
),
|
||||
title: Text(item.name),
|
||||
subtitle: Column(
|
||||
@@ -161,6 +89,14 @@ class _ManageBeneficiariesScreen extends State<ManageBeneficiariesScreen> {
|
||||
),
|
||||
],
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => BeneficiaryDetailsScreen(beneficiary: item),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
|
164
lib/features/card/screens/card_details_screen.dart
Normal file
164
lib/features/card/screens/card_details_screen.dart
Normal file
@@ -0,0 +1,164 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class CardDetailsScreen extends StatelessWidget {
|
||||
const CardDetailsScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("My Cards"),
|
||||
),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: ListView(
|
||||
children: const [
|
||||
CardTile(
|
||||
cardNumber: "**** **** **** 1234",
|
||||
cardNetwork: "VISA",
|
||||
cardType: "Debit Card",
|
||||
validFrom: "01/22",
|
||||
validTo: "01/27",
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
CardTile(
|
||||
cardNumber: "**** **** **** 5678",
|
||||
cardNetwork: "Mastercard",
|
||||
cardType: "Debit Card",
|
||||
validFrom: "07/21",
|
||||
validTo: "07/26",
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CardTile extends StatelessWidget {
|
||||
final String cardNumber;
|
||||
final String cardNetwork;
|
||||
final String cardType;
|
||||
final String validFrom;
|
||||
final String validTo;
|
||||
|
||||
const CardTile({
|
||||
super.key,
|
||||
required this.cardNumber,
|
||||
required this.cardNetwork,
|
||||
required this.cardType,
|
||||
required this.validFrom,
|
||||
required this.validTo,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
gradient: const LinearGradient(
|
||||
colors: [Colors.blue, Colors.indigo],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
color: Colors.black26,
|
||||
blurRadius: 8,
|
||||
spreadRadius: 2,
|
||||
offset: Offset(2, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Top row: Logo + Bank name
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
const Text(
|
||||
"Kangra Central Co-operative Bank",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
maxLines: 1,
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Card number (masked)
|
||||
Text(
|
||||
cardNumber,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 22,
|
||||
letterSpacing: 3,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// Validity
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text("VALID FROM",
|
||||
style: TextStyle(color: Colors.white70, fontSize: 10)),
|
||||
Text(
|
||||
validFrom,
|
||||
style: const TextStyle(color: Colors.white, fontSize: 14),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Text("VALID UPTO",
|
||||
style: TextStyle(color: Colors.white70, fontSize: 10)),
|
||||
Text(
|
||||
validTo,
|
||||
style: const TextStyle(color: Colors.white, fontSize: 14),
|
||||
),
|
||||
],
|
||||
),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
cardNetwork,
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
cardType,
|
||||
style: const TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:kmobile/features/card/screens/block_card_screen.dart';
|
||||
import 'package:kmobile/features/card/screens/card_details_screen.dart';
|
||||
import 'package:kmobile/features/card/screens/card_pin_change_details_screen.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
@@ -64,11 +65,24 @@ class _CardManagementScreen extends State<CardManagementScreen> {
|
||||
CardManagementTile(
|
||||
icon: Symbols.password_2,
|
||||
label: AppLocalizations.of(context).changeCardPin,
|
||||
onTap: () {
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(
|
||||
// builder: (context) => const CardPinChangeDetailsScreen(),
|
||||
// ),
|
||||
// );
|
||||
},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
CardManagementTile(
|
||||
icon: Symbols.payment_card,
|
||||
label: AppLocalizations.of(context).viewCardDeatils,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const CardPinChangeDetailsScreen(),
|
||||
builder: (context) => const CardDetailsScreen(),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -80,6 +94,7 @@ class _CardManagementScreen extends State<CardManagementScreen> {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class CardManagementTile extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String label;
|
||||
|
@@ -1,7 +1,6 @@
|
||||
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 '../../../l10n/app_localizations.dart';
|
||||
|
||||
class CustomerInfoScreen extends StatefulWidget {
|
||||
@@ -16,34 +15,12 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||
late final User user = widget.user;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(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:
|
||||
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
AppLocalizations.of(context).customerInfo,
|
||||
),
|
||||
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(),
|
||||
@@ -55,7 +32,6 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||
children: [
|
||||
const SizedBox(height: 30),
|
||||
CircleAvatar(
|
||||
backgroundColor: Colors.grey[200],
|
||||
radius: 50,
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/avatar_male.svg',
|
||||
@@ -68,16 +44,18 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||
padding: const EdgeInsets.only(top: 10.0),
|
||||
child: Text(
|
||||
user.name ?? '',
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
color: Colors.black,
|
||||
color: theme.colorScheme.onSurface,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'${AppLocalizations.of(context).cif}: ${user.cifNumber ?? 'N/A'}',
|
||||
style: const TextStyle(fontSize: 16, color: Colors.grey),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: theme.colorScheme.onSurfaceVariant),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
InfoField(
|
||||
@@ -125,6 +103,7 @@ class InfoField extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
margin: const EdgeInsets.symmetric(vertical: 8),
|
||||
@@ -133,16 +112,16 @@ class InfoField extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.black87,
|
||||
color: theme.colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 3),
|
||||
Text(
|
||||
value,
|
||||
style: const TextStyle(fontSize: 16, color: Colors.black),
|
||||
style: TextStyle(fontSize: 16, color: theme.colorScheme.onSurface),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@@ -1,4 +1,3 @@
|
||||
// ignore_for_file: use_build_context_synchronously
|
||||
import 'dart:developer';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
@@ -13,7 +12,7 @@ import 'package:kmobile/features/auth/controllers/auth_state.dart';
|
||||
import 'package:kmobile/features/customer_info/screens/customer_info_screen.dart';
|
||||
import 'package:kmobile/features/beneficiaries/screens/manage_beneficiaries_screen.dart';
|
||||
import 'package:kmobile/features/enquiry/screens/enquiry_screen.dart';
|
||||
import 'package:kmobile/features/fund_transfer/screens/fund_transfer_beneficiary_screen.dart';
|
||||
import 'package:kmobile/features/fund_transfer/screens/fund_transfer_screen.dart';
|
||||
import 'package:kmobile/features/profile/profile_screen.dart';
|
||||
import 'package:kmobile/features/quick_pay/screens/quick_pay_screen.dart';
|
||||
import 'package:kmobile/security/secure_storage.dart';
|
||||
@@ -82,8 +81,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
// Call your AuthCubit or repository to refresh user/accounts data
|
||||
await context.read<AuthCubit>().refreshUserData();
|
||||
} catch (e) {
|
||||
if (!context.mounted) {
|
||||
return;
|
||||
}
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
/*const*/ SnackBar(
|
||||
SnackBar(
|
||||
content: Text(AppLocalizations.of(context).failedToRefresh),
|
||||
),
|
||||
);
|
||||
@@ -94,13 +96,12 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
}
|
||||
|
||||
Widget _buildBalanceShimmer() {
|
||||
final theme = Theme.of(context);
|
||||
return Shimmer.fromColors(
|
||||
baseColor: Theme.of(context).dialogBackgroundColor,
|
||||
highlightColor: Theme.of(context).dialogBackgroundColor,
|
||||
baseColor: theme.primaryColor,
|
||||
highlightColor: theme.colorScheme.onPrimary,
|
||||
child: Container(
|
||||
width: 100,
|
||||
height: 32,
|
||||
color: Theme.of(context).scaffoldBackgroundColor),
|
||||
width: 200, height: 42, color: theme.scaffoldBackgroundColor),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -169,6 +170,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
onPressed: () async {
|
||||
final auth = LocalAuthentication();
|
||||
final canCheck = await auth.canCheckBiometrics;
|
||||
if (!mounted) return;
|
||||
bool ok = false;
|
||||
if (canCheck) {
|
||||
ok = await auth.authenticate(
|
||||
@@ -179,6 +181,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
await storage.write('biometric_enabled', 'true');
|
||||
}
|
||||
await storage.write('biometric_prompt_shown', 'true');
|
||||
if (!mounted) return;
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
child: Text(AppLocalizations.of(context).enable),
|
||||
@@ -190,6 +193,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
return BlocListener<AuthCubit, AuthState>(
|
||||
listener: (context, state) async {
|
||||
if (state is Authenticated && !_biometricPromptShown) {
|
||||
@@ -202,15 +206,15 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
}
|
||||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
backgroundColor: theme.scaffoldBackgroundColor,
|
||||
appBar: AppBar(
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
backgroundColor: theme.scaffoldBackgroundColor,
|
||||
automaticallyImplyLeading: false,
|
||||
title: Text(
|
||||
AppLocalizations.of(context).kconnect,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).primaryColor,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: theme.primaryColor,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
centerTitle: true,
|
||||
@@ -268,10 +272,10 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
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).primaryColor,
|
||||
"${AppLocalizations.of(context).hi} $firstName!",
|
||||
style: GoogleFonts.baumans().copyWith(
|
||||
fontSize: 20,
|
||||
color: theme.primaryColor,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
@@ -285,7 +289,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
vertical: 10,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).primaryColor,
|
||||
color: theme.primaryColor,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Column(
|
||||
@@ -294,24 +298,22 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
"${AppLocalizations.of(context).accountNumber}: ",
|
||||
"${getFullAccountType(currAccount.accountType)}: ",
|
||||
style: TextStyle(
|
||||
color:
|
||||
Theme.of(context).dialogBackgroundColor,
|
||||
fontSize: 12,
|
||||
color: theme.colorScheme.onPrimary,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
DropdownButton<int>(
|
||||
value: selectedAccountIndex,
|
||||
dropdownColor: Theme.of(context).primaryColor,
|
||||
dropdownColor: theme.primaryColor,
|
||||
underline: const SizedBox(),
|
||||
icon: const Icon(Icons.keyboard_arrow_down),
|
||||
iconEnabledColor:
|
||||
Theme.of(context).dialogBackgroundColor,
|
||||
iconEnabledColor: theme.colorScheme.onPrimary,
|
||||
style: TextStyle(
|
||||
color:
|
||||
Theme.of(context).dialogBackgroundColor,
|
||||
fontSize: 14,
|
||||
color: theme.colorScheme.onPrimary,
|
||||
fontSize: 18,
|
||||
),
|
||||
items: List.generate(users.length, (index) {
|
||||
return DropdownMenuItem<int>(
|
||||
@@ -319,9 +321,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
child: Text(
|
||||
users[index].accountNo ?? 'N/A',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.dialogBackgroundColor,
|
||||
fontSize: 14,
|
||||
color: theme.colorScheme.onPrimary,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -360,15 +362,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
width: 20,
|
||||
height: 20,
|
||||
child: CircularProgressIndicator(
|
||||
color: Theme.of(context)
|
||||
.dialogBackgroundColor,
|
||||
color: theme.colorScheme.onPrimary,
|
||||
strokeWidth: 2,
|
||||
),
|
||||
)
|
||||
: Icon(
|
||||
Icons.refresh,
|
||||
color: Theme.of(context)
|
||||
.dialogBackgroundColor,
|
||||
Symbols.refresh,
|
||||
color: theme.colorScheme.onPrimary,
|
||||
),
|
||||
onPressed: isRefreshing
|
||||
? null
|
||||
@@ -377,22 +377,14 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(
|
||||
getFullAccountType(currAccount.accountType),
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).dialogBackgroundColor,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
const SizedBox(height: 15),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"₹ ",
|
||||
style: TextStyle(
|
||||
color:
|
||||
Theme.of(context).dialogBackgroundColor,
|
||||
color: theme.colorScheme.onPrimary,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
@@ -403,10 +395,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
isVisible
|
||||
? currAccount.currentBalance ??
|
||||
'0.00'
|
||||
: '********',
|
||||
: '*****',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.dialogBackgroundColor,
|
||||
color: theme.colorScheme.onPrimary,
|
||||
fontSize: 40,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
@@ -432,12 +423,15 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
});
|
||||
}
|
||||
},
|
||||
child: Icon(
|
||||
isVisible
|
||||
? Symbols.visibility_lock
|
||||
: Symbols.visibility,
|
||||
color: Theme.of(context)
|
||||
.scaffoldBackgroundColor,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Icon(
|
||||
isVisible
|
||||
? Symbols.visibility_lock
|
||||
: Symbols.visibility,
|
||||
color: theme.scaffoldBackgroundColor,
|
||||
weight: 800,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -492,14 +486,13 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) =>
|
||||
FundTransferBeneficiaryScreen(
|
||||
creditAccountNo:
|
||||
users[selectedAccountIndex]
|
||||
.accountNo!,
|
||||
remitterName:
|
||||
users[selectedAccountIndex]
|
||||
.name!)));
|
||||
builder: (context) => FundTransferScreen(
|
||||
creditAccountNo:
|
||||
users[selectedAccountIndex]
|
||||
.accountNo!,
|
||||
remitterName:
|
||||
users[selectedAccountIndex]
|
||||
.name!)));
|
||||
}, disable: false),
|
||||
_buildQuickLink(
|
||||
Symbols.server_person,
|
||||
@@ -526,6 +519,8 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
AccountStatementScreen(
|
||||
accountNo: users[selectedAccountIndex]
|
||||
.accountNo!,
|
||||
balance: users[selectedAccountIndex]
|
||||
.availableBalance!,
|
||||
)));
|
||||
}),
|
||||
_buildQuickLink(Symbols.checkbook,
|
||||
@@ -568,24 +563,25 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
tx.type == 'CR'
|
||||
? Symbols.call_received
|
||||
: Symbols.call_made,
|
||||
color:
|
||||
tx.type == 'CR' ? Colors.green : Colors.red,
|
||||
color: tx.type == 'CR'
|
||||
? const Color(0xFF10BB10)
|
||||
: theme.colorScheme.error,
|
||||
),
|
||||
title: Text(
|
||||
tx.date ?? '',
|
||||
style: const TextStyle(fontSize: 15),
|
||||
),
|
||||
subtitle: Text(
|
||||
tx.name != null
|
||||
? (tx.name!.length > 18
|
||||
? tx.name!.substring(0, 22)
|
||||
: 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),
|
||||
style: const TextStyle(fontSize: 17),
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
@@ -626,30 +622,26 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
}
|
||||
|
||||
List<Widget> _buildTransactionShimmer() {
|
||||
final theme = Theme.of(context);
|
||||
return List.generate(3, (i) {
|
||||
return ListTile(
|
||||
leading: Shimmer.fromColors(
|
||||
baseColor: Colors.grey[300]!,
|
||||
highlightColor: Colors.grey[100]!,
|
||||
child: CircleAvatar(
|
||||
radius: 12,
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor),
|
||||
radius: 12, backgroundColor: theme.scaffoldBackgroundColor),
|
||||
),
|
||||
title: Shimmer.fromColors(
|
||||
baseColor: Colors.grey[300]!,
|
||||
highlightColor: Colors.grey[100]!,
|
||||
child: Container(
|
||||
height: 10,
|
||||
width: 100,
|
||||
color: Theme.of(context).scaffoldBackgroundColor),
|
||||
height: 10, width: 100, color: theme.scaffoldBackgroundColor),
|
||||
),
|
||||
subtitle: Shimmer.fromColors(
|
||||
baseColor: Colors.grey[300]!,
|
||||
highlightColor: Colors.grey[100]!,
|
||||
child: Container(
|
||||
height: 8,
|
||||
width: 60,
|
||||
color: Theme.of(context).scaffoldBackgroundColor),
|
||||
height: 8, width: 60, color: theme.scaffoldBackgroundColor),
|
||||
),
|
||||
);
|
||||
});
|
||||
@@ -661,6 +653,7 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
VoidCallback onTap, {
|
||||
bool disable = false,
|
||||
}) {
|
||||
final theme = Theme.of(context);
|
||||
return InkWell(
|
||||
onTap: disable ? null : onTap,
|
||||
child: Column(
|
||||
@@ -669,7 +662,11 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
Icon(
|
||||
icon,
|
||||
size: 30,
|
||||
color: disable ? Colors.grey : Theme.of(context).primaryColor,
|
||||
color: disable
|
||||
? theme.colorScheme.surfaceContainerHighest
|
||||
: theme.primaryColor,
|
||||
grade: 200,
|
||||
weight: 700,
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
|
@@ -13,14 +13,6 @@ class AccountCard extends StatelessWidget {
|
||||
width: 300,
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
// gradient: LinearGradient(
|
||||
// begin: Alignment.topLeft,
|
||||
// end: Alignment.bottomRight,
|
||||
// colors: [
|
||||
// Theme.of(context).primaryColor,
|
||||
// Theme.of(context).primaryColor.withBlue(200),
|
||||
// ],
|
||||
// ),
|
||||
color: Theme.of(context).primaryColor,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
@@ -58,7 +50,7 @@ class AccountCard extends StatelessWidget {
|
||||
Text(
|
||||
account.accountNumber,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).dialogBackgroundColor, fontSize: 16),
|
||||
color: Theme.of(context).scaffoldBackgroundColor, fontSize: 16),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Text(
|
||||
@@ -73,7 +65,7 @@ class AccountCard extends StatelessWidget {
|
||||
Text(
|
||||
AppLocalizations.of(context).availableBalance,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).dialogBackgroundColor, fontSize: 12),
|
||||
color: Theme.of(context).scaffoldBackgroundColor, fontSize: 16),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@@ -1,10 +1,12 @@
|
||||
// ignore_for_file: avoid_print
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kmobile/api/services/neft_service.dart';
|
||||
import 'package:kmobile/api/services/rtgs_service.dart';
|
||||
import 'package:kmobile/api/services/imps_service.dart';
|
||||
import 'package:kmobile/data/models/imps_transaction.dart';
|
||||
import 'package:kmobile/widgets/bank_logos.dart';
|
||||
import 'package:kmobile/data/models/beneficiary.dart';
|
||||
import 'package:kmobile/data/models/neft_transaction.dart';
|
||||
import 'package:kmobile/data/models/payment_response.dart';
|
||||
@@ -13,19 +15,22 @@ import 'package:kmobile/di/injection.dart';
|
||||
import 'package:kmobile/features/fund_transfer/screens/payment_animation.dart';
|
||||
import 'package:kmobile/features/fund_transfer/screens/transaction_pin_screen.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
enum TransactionMode { neft, rtgs }
|
||||
import 'package:kmobile/api/services/payment_service.dart';
|
||||
import 'package:kmobile/data/models/transfer.dart';
|
||||
enum TransactionMode { neft, rtgs, imps }
|
||||
|
||||
class FundTransferAmountScreen extends StatefulWidget {
|
||||
final String debitAccountNo;
|
||||
final Beneficiary creditBeneficiary;
|
||||
final String remitterName;
|
||||
final bool isOwnBank;
|
||||
|
||||
const FundTransferAmountScreen({
|
||||
super.key,
|
||||
required this.debitAccountNo,
|
||||
required this.creditBeneficiary,
|
||||
required this.remitterName,
|
||||
this.isOwnBank = false,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -33,7 +38,7 @@ class FundTransferAmountScreen extends StatefulWidget {
|
||||
_FundTransferAmountScreenState();
|
||||
}
|
||||
|
||||
class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
||||
class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
||||
final _amountController = TextEditingController();
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
TransactionMode _selectedMode = TransactionMode.neft;
|
||||
@@ -44,235 +49,244 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
Widget _getBankLogo(String? bankName) {
|
||||
if (bankName != null &&
|
||||
bankName.toLowerCase().contains('state bank of india')) {
|
||||
return Image.asset(
|
||||
'assets/images/sbi_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
} else {
|
||||
return const Icon(
|
||||
Icons.account_balance,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void _onProceed() {
|
||||
if (_formKey.currentState!.validate()) {
|
||||
final amount = double.tryParse(_amountController.text) ?? 0;
|
||||
if (widget.isOwnBank) {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => TransactionPinScreen(
|
||||
onPinCompleted: (pinScreenContext, tpin) async {
|
||||
final transfer = Transfer(
|
||||
fromAccount: widget.debitAccountNo,
|
||||
toAccount: widget.creditBeneficiary.accountNo,
|
||||
toAccountType: 'Savings', // Assuming 'SB' for savings
|
||||
amount: _amountController.text,
|
||||
tpin: tpin,
|
||||
);
|
||||
|
||||
if (_selectedMode == TransactionMode.rtgs && amount < 200000) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: Text(AppLocalizations.of(context).invalidRtgs),
|
||||
content: Text(AppLocalizations.of(context).invalidRtgsPopUp),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(ctx).pop(),
|
||||
child: Text(AppLocalizations.of(context).ok),
|
||||
),
|
||||
],
|
||||
final paymentService = getIt<PaymentService>();
|
||||
final paymentResponseFuture =
|
||||
paymentService.processQuickPayWithinBank(transfer);
|
||||
|
||||
Navigator.of(pinScreenContext).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => PaymentAnimationScreen(
|
||||
paymentResponse: paymentResponseFuture),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
return; // Stop further execution
|
||||
}
|
||||
} else {
|
||||
if (_selectedMode == TransactionMode.rtgs && amount < 200000) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: Text(AppLocalizations.of(context).invalidRtgs),
|
||||
content: Text(AppLocalizations.of(context).invalidRtgsPopUp),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(ctx).pop(),
|
||||
child: Text(AppLocalizations.of(context).ok),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
return; // Stop further execution
|
||||
}
|
||||
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => TransactionPinScreen(
|
||||
onPinCompleted: (pinScreenContext, tpin) async {
|
||||
if (_selectedMode == TransactionMode.neft) {
|
||||
final neftTx = NeftTransaction(
|
||||
fromAccount: widget.debitAccountNo,
|
||||
toAccount: widget.creditBeneficiary.accountNo,
|
||||
amount: _amountController.text,
|
||||
ifscCode: widget.creditBeneficiary.ifscCode,
|
||||
remitterName: widget.remitterName,
|
||||
beneficiaryName: widget.creditBeneficiary.name,
|
||||
tpin: tpin,
|
||||
);
|
||||
final neftService = getIt<NeftService>();
|
||||
|
||||
final completer = Completer<PaymentResponse>();
|
||||
|
||||
Navigator.of(pinScreenContext).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => PaymentAnimationScreen(
|
||||
paymentResponse: completer.future),
|
||||
),
|
||||
);
|
||||
|
||||
try {
|
||||
final neftResponse =
|
||||
await neftService.processNeftTransaction(neftTx);
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: neftResponse.message.toUpperCase() == 'SUCCESS',
|
||||
date: DateTime.now(),
|
||||
creditedAccount: neftTx.toAccount,
|
||||
amount: neftTx.amount,
|
||||
currency: 'INR',
|
||||
utr: neftResponse.utr,
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => TransactionPinScreen(
|
||||
onPinCompleted: (pinScreenContext, tpin) async {
|
||||
if (_selectedMode == TransactionMode.neft) {
|
||||
final neftTx = NeftTransaction(
|
||||
fromAccount: widget.debitAccountNo,
|
||||
toAccount: widget.creditBeneficiary.accountNo,
|
||||
amount: _amountController.text,
|
||||
ifscCode: widget.creditBeneficiary.ifscCode,
|
||||
remitterName: widget.remitterName,
|
||||
beneficiaryName: widget.creditBeneficiary.name,
|
||||
tpin: tpin,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} on DioException catch (e) {
|
||||
print('dio exception');
|
||||
print(e.toString());
|
||||
final neftService = getIt<NeftService>();
|
||||
final completer = Completer<PaymentResponse>();
|
||||
|
||||
final error = jsonDecode(e.response.toString())['error'];
|
||||
var errorMessage = {
|
||||
"INCORRECT_TPIN":
|
||||
AppLocalizations.of(context).correctTpin,
|
||||
"INSUFFICIENT_FUNDS":
|
||||
AppLocalizations.of(context).insufficientFund
|
||||
}[error] ??
|
||||
AppLocalizations.of(context).somethingWentWrong;
|
||||
Navigator.of(pinScreenContext).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => PaymentAnimationScreen(
|
||||
paymentResponse: completer.future),
|
||||
),
|
||||
);
|
||||
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: errorMessage,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} catch (e) {
|
||||
print('generic exception');
|
||||
print(e.toString());
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage:
|
||||
AppLocalizations.of(context).somethingWentWrong,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
try {
|
||||
final neftResponse =
|
||||
await neftService.processNeftTransaction(neftTx);
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess:
|
||||
neftResponse.message.toUpperCase() == 'SUCCESS',
|
||||
date: DateTime.now(),
|
||||
creditedAccount: neftTx.toAccount,
|
||||
amount: neftTx.amount,
|
||||
currency: 'INR',
|
||||
utr: neftResponse.utr,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} on DioException catch (e) {
|
||||
String errorMessage;
|
||||
if (e.response != null && e.response!.data != null) {
|
||||
try {
|
||||
// final error = jsonDecode(e.response!.toString())['error'];
|
||||
final error = e.response?.data['error'];
|
||||
errorMessage = {
|
||||
"INCORRECT_TPIN": "Please Enter the correct TPIN",
|
||||
"INSUFFICIENT_FUNDS":
|
||||
"Your account does not have sufficient balance"
|
||||
}[error] ??
|
||||
"Something Went Wrong";
|
||||
} catch (_) {
|
||||
errorMessage = "Something Went Wrong";
|
||||
}
|
||||
} else {
|
||||
errorMessage = "Something Went Wrong";
|
||||
}
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: errorMessage,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} catch (e) {
|
||||
if (!pinScreenContext.mounted) return;
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: AppLocalizations.of(pinScreenContext)
|
||||
.somethingWentWrong,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
// else if (_selectedMode == TransactionMode.imps){
|
||||
// final rtgsTx = RtgsTransaction(
|
||||
// fromAccount: widget.debitAccountNo,
|
||||
// toAccount: widget.creditBeneficiary.accountNo,
|
||||
// amount: _amountController.text,
|
||||
// ifscCode: widget.creditBeneficiary.ifscCode,
|
||||
// remitterName: widget.remitterName,
|
||||
// beneficiaryName: widget.creditBeneficiary.name,
|
||||
// tpin: tpin,
|
||||
// );
|
||||
// final rtgsService = getIt<RtgsService>();
|
||||
// final completer = Completer<PaymentResponse>();
|
||||
|
||||
// Navigator.of(pinScreenContext).pushReplacement(
|
||||
// MaterialPageRoute(
|
||||
// builder: (_) => PaymentAnimationScreen(
|
||||
// paymentResponse: completer.future),
|
||||
// ),
|
||||
// );
|
||||
|
||||
// try {
|
||||
// final rtgsResponse =
|
||||
// await rtgsService.processRtgsTransaction(rtgsTx);
|
||||
// final paymentResponse = PaymentResponse(
|
||||
// isSuccess: rtgsResponse.message.toUpperCase() == 'SUCCESS',
|
||||
// date: DateTime.now(),
|
||||
// creditedAccount: rtgsTx.toAccount,
|
||||
// amount: rtgsTx.amount,
|
||||
// currency: 'INR',
|
||||
// utr: rtgsResponse.utr,
|
||||
// );
|
||||
// completer.complete(paymentResponse);
|
||||
// } on DioException catch(e) {
|
||||
// print('dio exception');
|
||||
// print(e.toString());
|
||||
|
||||
// final error = jsonDecode(e.response.toString())['error'];
|
||||
// var errorMessage =
|
||||
// {
|
||||
// "INCORRECT_TPIN" : "Please Enter the correct TPIN",
|
||||
// "INSUFFICIENT_FUNDS": "Your account does not have sufficient balance"
|
||||
// }[error] ?? "Something Went Wrong";
|
||||
|
||||
// final paymentResponse = PaymentResponse(
|
||||
// isSuccess: false,
|
||||
// errorMessage: errorMessage,
|
||||
// );
|
||||
// completer.complete(paymentResponse);
|
||||
// } catch (e) {
|
||||
// print('generic exception');
|
||||
// print(e.toString());
|
||||
// final paymentResponse = PaymentResponse(
|
||||
// isSuccess: false,
|
||||
// errorMessage: "Something went Wrong",
|
||||
// );
|
||||
// completer.complete(paymentResponse);
|
||||
// }
|
||||
// }
|
||||
else {
|
||||
final rtgsTx = RtgsTransaction(
|
||||
fromAccount: widget.debitAccountNo,
|
||||
toAccount: widget.creditBeneficiary.accountNo,
|
||||
amount: _amountController.text,
|
||||
ifscCode: widget.creditBeneficiary.ifscCode,
|
||||
remitterName: widget.remitterName,
|
||||
beneficiaryName: widget.creditBeneficiary.name,
|
||||
tpin: tpin,
|
||||
);
|
||||
final rtgsService = getIt<RtgsService>();
|
||||
final completer = Completer<PaymentResponse>();
|
||||
|
||||
Navigator.of(pinScreenContext).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => PaymentAnimationScreen(
|
||||
paymentResponse: completer.future),
|
||||
),
|
||||
);
|
||||
|
||||
try {
|
||||
final rtgsResponse =
|
||||
await rtgsService.processRtgsTransaction(rtgsTx);
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: rtgsResponse.message.toUpperCase() == 'SUCCESS',
|
||||
date: DateTime.now(),
|
||||
creditedAccount: rtgsTx.toAccount,
|
||||
amount: rtgsTx.amount,
|
||||
currency: 'INR',
|
||||
utr: rtgsResponse.utr,
|
||||
//IMPS transaction
|
||||
else if (_selectedMode == TransactionMode.imps) {
|
||||
final impsTx = ImpsTransaction(
|
||||
fromAccount: widget.debitAccountNo,
|
||||
toAccount: widget.creditBeneficiary.accountNo,
|
||||
amount: _amountController.text,
|
||||
ifscCode: widget.creditBeneficiary.ifscCode,
|
||||
remitterName: widget.remitterName,
|
||||
beneficiaryName: widget.creditBeneficiary.name,
|
||||
tpin: tpin,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} on DioException catch (e) {
|
||||
print('dio exception');
|
||||
print(e.toString());
|
||||
final impsService = getIt<ImpsService>();
|
||||
final completer = Completer<PaymentResponse>();
|
||||
|
||||
final error = jsonDecode(e.response.toString())['error'];
|
||||
var errorMessage = {
|
||||
"INCORRECT_TPIN":
|
||||
AppLocalizations.of(context).correctTpin,
|
||||
"INSUFFICIENT_FUNDS":
|
||||
AppLocalizations.of(context).insufficientFund
|
||||
// ignore: use_build_context_synchronously
|
||||
}[error] ??
|
||||
AppLocalizations.of(context).somethingWentWrong;
|
||||
Navigator.of(pinScreenContext).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => PaymentAnimationScreen(
|
||||
paymentResponse: completer.future),
|
||||
),
|
||||
);
|
||||
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: errorMessage,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} catch (e) {
|
||||
print('generic exception');
|
||||
print(e.toString());
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage:
|
||||
AppLocalizations.of(context).somethingWentWrong,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
try {
|
||||
final impsResponse =
|
||||
await impsService.processImpsTransaction(impsTx);
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess:
|
||||
impsResponse.message.toUpperCase() == 'SUCCESS',
|
||||
date: DateTime.now(),
|
||||
creditedAccount: impsTx.toAccount,
|
||||
amount: impsTx.amount,
|
||||
currency: 'INR',
|
||||
utr: impsResponse.utr,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} on DioException catch (e) {
|
||||
final error = jsonDecode(e.response.toString())['error'];
|
||||
var errorMessage = {
|
||||
"INCORRECT_TPIN": "Please Enter the correct TPIN",
|
||||
"INSUFFICIENT_FUNDS":
|
||||
"Your account does not have sufficient balance"
|
||||
}[error] ??
|
||||
"Something Went Wrong";
|
||||
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: errorMessage,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} catch (e) {
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: "Something went Wrong",
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//RTGS
|
||||
else {
|
||||
final rtgsTx = RtgsTransaction(
|
||||
fromAccount: widget.debitAccountNo,
|
||||
toAccount: widget.creditBeneficiary.accountNo,
|
||||
amount: _amountController.text,
|
||||
ifscCode: widget.creditBeneficiary.ifscCode,
|
||||
remitterName: widget.remitterName,
|
||||
beneficiaryName: widget.creditBeneficiary.name,
|
||||
tpin: tpin,
|
||||
);
|
||||
final rtgsService = getIt<RtgsService>();
|
||||
final completer = Completer<PaymentResponse>();
|
||||
|
||||
Navigator.of(pinScreenContext).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => PaymentAnimationScreen(
|
||||
paymentResponse: completer.future),
|
||||
),
|
||||
);
|
||||
|
||||
try {
|
||||
final rtgsResponse =
|
||||
await rtgsService.processRtgsTransaction(rtgsTx);
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess:
|
||||
rtgsResponse.message.toUpperCase() == 'SUCCESS',
|
||||
date: DateTime.now(),
|
||||
creditedAccount: rtgsTx.toAccount,
|
||||
amount: rtgsTx.amount,
|
||||
currency: 'INR',
|
||||
utr: rtgsResponse.utr,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} on DioException catch (e) {
|
||||
final error = jsonDecode(e.response.toString())['error'];
|
||||
var errorMessage = {
|
||||
"INCORRECT_TPIN": "Please Enter the correct TPIN",
|
||||
"INSUFFICIENT_FUNDS":
|
||||
"Your account does not have sufficient balance"
|
||||
// ignore: use_build_context_synchronously
|
||||
}[error] ??
|
||||
"Something Went Wrong";
|
||||
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: errorMessage,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} catch (e) {
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: "Something Went Wrong",
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
}
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,64 +333,68 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
||||
elevation: 0,
|
||||
margin: const EdgeInsets.symmetric(vertical: 8.0),
|
||||
child: ListTile(
|
||||
leading: _getBankLogo(widget.creditBeneficiary.bankName),
|
||||
leading: getBankLogo(widget.creditBeneficiary.bankName),
|
||||
title: Text(widget.creditBeneficiary.name),
|
||||
subtitle: Text(widget.creditBeneficiary.accountNo),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// Transaction Mode Selection
|
||||
Text(
|
||||
AppLocalizations.of(context).selectTransactionType,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).cardColor,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: Colors.grey.shade300),
|
||||
if (!widget.isOwnBank) ...[
|
||||
// Transaction Mode Selection
|
||||
Text(
|
||||
AppLocalizations.of(context).selectTransactionType,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
child: ToggleButtons(
|
||||
isSelected: [
|
||||
_selectedMode == TransactionMode.neft,
|
||||
_selectedMode == TransactionMode.rtgs
|
||||
],
|
||||
onPressed: (index) {
|
||||
setState(() {
|
||||
_selectedMode = TransactionMode.values[index];
|
||||
});
|
||||
},
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
selectedColor: Theme.of(context).colorScheme.onPrimary,
|
||||
fillColor: Theme.of(context).primaryColor,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
borderColor: Colors.transparent,
|
||||
selectedBorderColor: Colors.transparent,
|
||||
splashColor: Theme.of(context).primaryColor.withOpacity(0.1),
|
||||
highlightColor:
|
||||
Theme.of(context).primaryColor.withOpacity(0.05),
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 24.0, vertical: 12.0),
|
||||
child: Text(AppLocalizations.of(context).neft),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 24.0, vertical: 12.0),
|
||||
child: Text(AppLocalizations.of(context).rtgs),
|
||||
),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
|
||||
// child: Text(AppLocalizations.of(context).imps),
|
||||
// ),
|
||||
],
|
||||
const SizedBox(height: 12),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).cardColor,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
border: Border.all(color: Colors.grey.shade300),
|
||||
),
|
||||
child: ToggleButtons(
|
||||
isSelected: [
|
||||
_selectedMode == TransactionMode.neft,
|
||||
_selectedMode == TransactionMode.rtgs,
|
||||
_selectedMode == TransactionMode.imps,
|
||||
],
|
||||
onPressed: (index) {
|
||||
setState(() {
|
||||
_selectedMode = TransactionMode.values[index];
|
||||
});
|
||||
},
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
selectedColor: Theme.of(context).colorScheme.onPrimary,
|
||||
fillColor: Theme.of(context).primaryColor,
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
borderColor: Colors.transparent,
|
||||
selectedBorderColor: Colors.transparent,
|
||||
splashColor:
|
||||
Theme.of(context).primaryColor,
|
||||
highlightColor:
|
||||
Theme.of(context).primaryColor,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 24.0, vertical: 12.0),
|
||||
child: Text(AppLocalizations.of(context).neft),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 24.0, vertical: 12.0),
|
||||
child: Text(AppLocalizations.of(context).rtgs),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 24.0, vertical: 12.0),
|
||||
child: Text(AppLocalizations.of(context).imps),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
const SizedBox(height: 24),
|
||||
],
|
||||
// Amount
|
||||
TextFormField(
|
||||
controller: _amountController,
|
||||
@@ -416,4 +434,4 @@ class _FundTransferAmountScreenState extends State<FundTransferAmountScreen> {
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:kmobile/widgets/bank_logos.dart';
|
||||
import 'package:kmobile/data/models/beneficiary.dart';
|
||||
import 'package:kmobile/features/fund_transfer/screens/fund_transfer_amount_screen.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
@@ -9,8 +10,12 @@ import 'package:shimmer/shimmer.dart';
|
||||
class FundTransferBeneficiaryScreen extends StatefulWidget {
|
||||
final String creditAccountNo;
|
||||
final String remitterName;
|
||||
final bool isOwnBank;
|
||||
const FundTransferBeneficiaryScreen(
|
||||
{super.key, required this.creditAccountNo, required this.remitterName});
|
||||
{super.key,
|
||||
required this.creditAccountNo,
|
||||
required this.remitterName,
|
||||
required this.isOwnBank});
|
||||
|
||||
@override
|
||||
State<FundTransferBeneficiaryScreen> createState() =>
|
||||
@@ -32,7 +37,12 @@ class _FundTransferBeneficiaryScreenState
|
||||
Future<void> _loadBeneficiaries() async {
|
||||
final data = await service.fetchBeneficiaryList();
|
||||
setState(() {
|
||||
_beneficiaries = data;
|
||||
_beneficiaries = data
|
||||
.where((b) => widget.isOwnBank
|
||||
? b.bankName ==
|
||||
'THE KANGRA CENTRAL CO-OP BANK LIMITED' // Assuming 'KCCB' is your bank's name
|
||||
: b.bankName != 'THE KANGRA CENTRAL CO-OP BANK LIMITED')
|
||||
.toList();
|
||||
_isLoading = false;
|
||||
});
|
||||
}
|
||||
@@ -63,51 +73,6 @@ class _FundTransferBeneficiaryScreenState
|
||||
);
|
||||
}
|
||||
|
||||
Widget _getBankLogo(String? bankName) {
|
||||
if (bankName != null && bankName.toLowerCase().contains('state bank ')) {
|
||||
return Image.asset(
|
||||
'assets/images/sbi_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('kangra central')) {
|
||||
return Image.asset(
|
||||
'assets/images/icon.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('hdfc bank ltd')) {
|
||||
return Image.asset(
|
||||
'assets/images/hdfc_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('icici bank ltd')) {
|
||||
return Image.asset(
|
||||
'assets/images/icici_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null &&
|
||||
bankName.toLowerCase().contains('punjab national bank')) {
|
||||
return Image.asset(
|
||||
'assets/images/pnb_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
} else {
|
||||
return const Icon(
|
||||
Icons.account_balance,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildBeneficiaryList() {
|
||||
if (_beneficiaries.isEmpty) {
|
||||
return Center(
|
||||
@@ -121,7 +86,7 @@ class _FundTransferBeneficiaryScreenState
|
||||
leading: CircleAvatar(
|
||||
radius: 24,
|
||||
backgroundColor: Colors.transparent,
|
||||
child: _getBankLogo(beneficiary.bankName),
|
||||
child: getBankLogo(beneficiary.bankName),
|
||||
),
|
||||
title: Text(beneficiary.name),
|
||||
subtitle: Column(
|
||||
@@ -144,6 +109,7 @@ class _FundTransferBeneficiaryScreenState
|
||||
debitAccountNo: widget.creditAccountNo,
|
||||
creditBeneficiary: beneficiary,
|
||||
remitterName: widget.remitterName,
|
||||
isOwnBank: widget.isOwnBank,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
@@ -1,153 +1,88 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:material_symbols_icons/material_symbols_icons.dart';
|
||||
import 'package:kmobile/features/fund_transfer/screens/fund_transfer_beneficiary_screen.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
class FundTransferScreen extends StatefulWidget {
|
||||
const FundTransferScreen({super.key});
|
||||
class FundTransferScreen extends StatelessWidget {
|
||||
final String creditAccountNo;
|
||||
final String remitterName;
|
||||
|
||||
@override
|
||||
State<FundTransferScreen> createState() => _FundTransferScreen();
|
||||
}
|
||||
|
||||
class _FundTransferScreen extends State<FundTransferScreen> {
|
||||
String amount = "";
|
||||
|
||||
void onKeyTap(String key) {
|
||||
setState(() {
|
||||
if (key == 'back') {
|
||||
if (amount.isNotEmpty) {
|
||||
amount = amount.substring(0, amount.length - 1);
|
||||
}
|
||||
} else if (key == 'done') {
|
||||
if (kDebugMode) {
|
||||
print('${AppLocalizations.of(context).amountEntered} $amount');
|
||||
// Navigator.push(
|
||||
// context,
|
||||
// MaterialPageRoute(
|
||||
// builder: (context) => const TransactionPinScreen(
|
||||
// transactionData: {},
|
||||
// transactionCode: 'TRANSFER'
|
||||
// )));
|
||||
}
|
||||
} else {
|
||||
amount += key;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Widget buildKey(String value) {
|
||||
if (value == 'done') {
|
||||
return GestureDetector(
|
||||
onTap: () => onKeyTap(value),
|
||||
child: const Icon(Symbols.check, size: 30),
|
||||
);
|
||||
} else if (value == 'back') {
|
||||
return GestureDetector(
|
||||
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),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
final keys = [
|
||||
'1',
|
||||
'2',
|
||||
'3',
|
||||
'4',
|
||||
'5',
|
||||
'6',
|
||||
'7',
|
||||
'8',
|
||||
'9',
|
||||
'done',
|
||||
'0',
|
||||
'back',
|
||||
];
|
||||
const FundTransferScreen({
|
||||
super.key,
|
||||
required this.creditAccountNo,
|
||||
required this.remitterName,
|
||||
});
|
||||
|
||||
@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).fundTransfer,
|
||||
style:
|
||||
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
),
|
||||
centerTitle: false,
|
||||
actions: const [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 10.0),
|
||||
child: CircleAvatar(
|
||||
backgroundImage: AssetImage('assets/images/avatar.jpg'),
|
||||
// Replace with your image
|
||||
radius: 20,
|
||||
),
|
||||
),
|
||||
],
|
||||
title: Text(AppLocalizations.of(context).fundTransfer),
|
||||
),
|
||||
body: Column(
|
||||
body: ListView(
|
||||
children: [
|
||||
const Spacer(),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(AppLocalizations.of(context).debitFrom),
|
||||
const Text(
|
||||
'0300015678903456',
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
FundTransferManagementTile(
|
||||
icon: Symbols.input_circle,
|
||||
label: AppLocalizations.of(context).ownBank,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => FundTransferBeneficiaryScreen(
|
||||
creditAccountNo: creditAccountNo,
|
||||
remitterName: remitterName,
|
||||
isOwnBank: true,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Text(
|
||||
AppLocalizations.of(context).enterAmount,
|
||||
style: const TextStyle(fontSize: 20),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey.shade200,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Text(
|
||||
amount.isEmpty ? "0" : amount,
|
||||
style: const TextStyle(fontSize: 32, fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
color: Theme.of(context).scaffoldBackgroundColor,
|
||||
child: GridView.count(
|
||||
crossAxisCount: 3,
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
mainAxisSpacing: 12,
|
||||
crossAxisSpacing: 12,
|
||||
childAspectRatio: 1.2,
|
||||
children: keys.map((key) => buildKey(key)).toList(),
|
||||
),
|
||||
const Divider(height: 1),
|
||||
FundTransferManagementTile(
|
||||
icon: Symbols.output_circle,
|
||||
label: AppLocalizations.of(context).outsideBank,
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => FundTransferBeneficiaryScreen(
|
||||
creditAccountNo: creditAccountNo,
|
||||
remitterName: remitterName,
|
||||
isOwnBank: false,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class FundTransferManagementTile extends StatelessWidget {
|
||||
final IconData icon;
|
||||
final String label;
|
||||
final VoidCallback onTap;
|
||||
final bool disable;
|
||||
|
||||
const FundTransferManagementTile({
|
||||
super.key,
|
||||
required this.icon,
|
||||
required this.label,
|
||||
required this.onTap,
|
||||
this.disable = false,
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
leading: Icon(icon),
|
||||
title: Text(label),
|
||||
trailing: const Icon(Symbols.arrow_right, size: 20),
|
||||
onTap: onTap,
|
||||
enabled: !disable,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ class ColorThemeDialog extends StatelessWidget {
|
||||
),
|
||||
ListTile(
|
||||
leading: const CircleAvatar(backgroundColor: Colors.green),
|
||||
title: const Text('Green'),
|
||||
title: Text(AppLocalizations.of(context).green),
|
||||
onTap: () {
|
||||
context.read<ThemeCubit>().changeTheme(ThemeType.green);
|
||||
Navigator.pop(context);
|
||||
@@ -30,7 +30,7 @@ class ColorThemeDialog extends StatelessWidget {
|
||||
),
|
||||
ListTile(
|
||||
leading: const CircleAvatar(backgroundColor: Colors.orange),
|
||||
title: const Text('Orange'),
|
||||
title: Text(AppLocalizations.of(context).orange),
|
||||
onTap: () {
|
||||
context.read<ThemeCubit>().changeTheme(ThemeType.orange);
|
||||
Navigator.pop(context);
|
||||
|
@@ -1,7 +1,11 @@
|
||||
import 'dart:async';
|
||||
import 'dart:developer';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:kmobile/api/services/imps_service.dart';
|
||||
import 'package:kmobile/api/services/neft_service.dart';
|
||||
import 'package:kmobile/api/services/rtgs_service.dart';
|
||||
import 'package:kmobile/data/models/imps_transaction.dart';
|
||||
import 'package:kmobile/data/models/neft_transaction.dart';
|
||||
import 'package:kmobile/data/models/payment_response.dart';
|
||||
import 'package:kmobile/data/models/rtgs_transaction.dart';
|
||||
@@ -48,7 +52,7 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
setState(() {
|
||||
accountType = AppLocalizations.of(context).savings;
|
||||
accountType = 'Savings';
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -118,6 +122,7 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
return [
|
||||
AppLocalizations.of(context).neft,
|
||||
AppLocalizations.of(context).rtgs,
|
||||
AppLocalizations.of(context).imps,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -151,6 +156,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
final amount = double.tryParse(amountController.text) ?? 0;
|
||||
final selectedMode = transactionModes(context)[selectedTransactionIndex];
|
||||
final isRtgs = selectedMode == AppLocalizations.of(context).rtgs;
|
||||
final isNeft = selectedMode == AppLocalizations.of(context).neft;
|
||||
final isImps = selectedMode == AppLocalizations.of(context).imps;
|
||||
|
||||
if (isRtgs && amount < 200000) {
|
||||
showDialog(
|
||||
@@ -174,14 +181,14 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
MaterialPageRoute(
|
||||
builder: (context) => TransactionPinScreen(
|
||||
onPinCompleted: (pinScreenContext, tpin) async {
|
||||
if (!isRtgs) {
|
||||
if (isNeft) {
|
||||
// NEFT
|
||||
final neftTx = NeftTransaction(
|
||||
fromAccount: widget.debitAccount,
|
||||
toAccount: accountNumberController.text,
|
||||
amount: amountController.text,
|
||||
ifscCode: ifscController.text,
|
||||
remitterName: "Unknown", // TODO: Get actual remitter name
|
||||
remitterName: "Unknown",
|
||||
beneficiaryName: nameController.text,
|
||||
tpin: tpin,
|
||||
);
|
||||
@@ -207,6 +214,29 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
utr: neftResponse.utr,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} on DioException catch (e) {
|
||||
String errorMessage;
|
||||
if (e.response != null && e.response!.data != null) {
|
||||
try {
|
||||
// final error = jsonDecode(e.response!.toString())['error'];
|
||||
final error = e.response?.data['error'];
|
||||
errorMessage = {
|
||||
"INCORRECT_TPIN": "Please Enter the correct TPIN",
|
||||
"INSUFFICIENT_FUNDS":
|
||||
"Your account does not have sufficient balance"
|
||||
}[error] ??
|
||||
"Something Went Wrong";
|
||||
} catch (_) {
|
||||
errorMessage = "Something Went Wrong";
|
||||
}
|
||||
} else {
|
||||
errorMessage = "Something Went Wrong";
|
||||
}
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: errorMessage,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} catch (e) {
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
@@ -214,20 +244,83 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
if (isImps) {
|
||||
// IMPS
|
||||
final impsTx = ImpsTransaction(
|
||||
fromAccount: widget.debitAccount,
|
||||
toAccount: accountNumberController.text,
|
||||
amount: amountController.text,
|
||||
ifscCode: ifscController.text,
|
||||
remitterName: "Unknown",
|
||||
beneficiaryName: nameController.text,
|
||||
tpin: tpin,
|
||||
);
|
||||
final impsService = getIt<ImpsService>();
|
||||
final completer = Completer<PaymentResponse>();
|
||||
if (!pinScreenContext.mounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
Navigator.of(pinScreenContext).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => PaymentAnimationScreen(
|
||||
paymentResponse: completer.future),
|
||||
),
|
||||
);
|
||||
|
||||
try {
|
||||
final impsResponse =
|
||||
await impsService.processImpsTransaction(impsTx);
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: impsResponse.message.toUpperCase() == 'SUCCESS',
|
||||
date: DateTime.now(),
|
||||
creditedAccount: impsTx.toAccount,
|
||||
amount: impsTx.amount,
|
||||
currency: 'INR',
|
||||
utr: impsResponse.utr,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} on DioException catch (e) {
|
||||
final error = e.response?.data['error'];
|
||||
var errorMessage = {
|
||||
"INCORRECT_TPIN": "Please Enter the correct TPIN",
|
||||
"INSUFFICIENT_FUNDS":
|
||||
"Your account does not have sufficient balance"
|
||||
}[error] ??
|
||||
"Something Went Wrong";
|
||||
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: errorMessage,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} catch (e) {
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: e.toString(),
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
}
|
||||
}
|
||||
|
||||
if (isRtgs) {
|
||||
// RTGS
|
||||
final rtgsTx = RtgsTransaction(
|
||||
fromAccount: widget.debitAccount,
|
||||
toAccount: accountNumberController.text,
|
||||
amount: amountController.text,
|
||||
ifscCode: ifscController.text,
|
||||
remitterName: "Unknown", // TODO: Get actual remitter name
|
||||
remitterName: "Unknown",
|
||||
beneficiaryName: nameController.text,
|
||||
tpin: tpin,
|
||||
);
|
||||
final rtgsService = getIt<RtgsService>();
|
||||
final completer = Completer<PaymentResponse>();
|
||||
|
||||
if (!pinScreenContext.mounted) {
|
||||
return;
|
||||
}
|
||||
Navigator.of(pinScreenContext).pushReplacement(
|
||||
MaterialPageRoute(
|
||||
builder: (_) => PaymentAnimationScreen(
|
||||
@@ -247,6 +340,22 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
utr: rtgsResponse.utr,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} on DioException catch (e) {
|
||||
log('dio exception');
|
||||
|
||||
final error = e.response?.data['error'];
|
||||
var errorMessage = {
|
||||
"INCORRECT_TPIN": "Please Enter the correct TPIN",
|
||||
"INSUFFICIENT_FUNDS":
|
||||
"Your account does not have sufficient balance"
|
||||
}[error] ??
|
||||
"Something Went Wrong";
|
||||
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
errorMessage: errorMessage,
|
||||
);
|
||||
completer.complete(paymentResponse);
|
||||
} catch (e) {
|
||||
final paymentResponse = PaymentResponse(
|
||||
isSuccess: false,
|
||||
@@ -383,6 +492,7 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
),
|
||||
const SizedBox(height: 25),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(
|
||||
child: TextFormField(
|
||||
@@ -431,7 +541,9 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
},
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Expanded(
|
||||
child: DropdownButtonFormField<String>(
|
||||
value: accountType,
|
||||
@@ -449,8 +561,8 @@ class _QuickPayOutsideBankScreen extends State<QuickPayOutsideBankScreen> {
|
||||
),
|
||||
),
|
||||
items: [
|
||||
AppLocalizations.of(context).savings,
|
||||
AppLocalizations.of(context).current,
|
||||
'Savings',
|
||||
'Current',
|
||||
]
|
||||
.map(
|
||||
(e) => DropdownMenuItem(value: e, child: Text(e)),
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
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';
|
||||
@@ -18,33 +17,9 @@ class _QuickPayScreen extends State<QuickPayScreen> {
|
||||
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).quickPay.replaceAll('\n', ' '),
|
||||
style:
|
||||
const TextStyle(color: Colors.black, fontWeight: FontWeight.w500),
|
||||
AppLocalizations.of(context).quickPay.replaceAll('\n', ''),
|
||||
),
|
||||
centerTitle: false,
|
||||
actions: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 10.0),
|
||||
child: CircleAvatar(
|
||||
backgroundColor: Colors.grey[200],
|
||||
radius: 20,
|
||||
child: SvgPicture.asset(
|
||||
'assets/images/avatar_male.svg',
|
||||
width: 40,
|
||||
height: 40,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
|
163
lib/features/service/screens/branch_locator_screen.dart
Normal file
163
lib/features/service/screens/branch_locator_screen.dart
Normal file
@@ -0,0 +1,163 @@
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class Branch {
|
||||
final String name;
|
||||
final String code;
|
||||
final String ifsc;
|
||||
final String address;
|
||||
|
||||
Branch({
|
||||
required this.name,
|
||||
required this.code,
|
||||
required this.ifsc,
|
||||
required this.address,
|
||||
});
|
||||
}
|
||||
|
||||
class BranchLocatorScreen extends StatefulWidget {
|
||||
const BranchLocatorScreen({super.key});
|
||||
|
||||
@override
|
||||
State<BranchLocatorScreen> createState() => _BranchLocatorScreenState();
|
||||
}
|
||||
|
||||
class _BranchLocatorScreenState extends State<BranchLocatorScreen> {
|
||||
final TextEditingController _searchController = TextEditingController();
|
||||
|
||||
// Static list of 5 branches
|
||||
final List<Branch> _branches = [
|
||||
Branch(
|
||||
name: "Dharamsala - Head Office",
|
||||
code: "002",
|
||||
ifsc: "KACE0000002",
|
||||
address: "Civil Lines Dharmashala, Kangra, HP - 176215"),
|
||||
Branch(
|
||||
name: "Kangra",
|
||||
code: "033",
|
||||
ifsc: "KACE0000033",
|
||||
address: "Rajput Bhawankangrapo Kangra, Kangra, HP "),
|
||||
];
|
||||
|
||||
List<Branch> _filteredBranches = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
_filteredBranches = _branches; // Initially show all branches
|
||||
}
|
||||
|
||||
void _filterBranches(String query) {
|
||||
setState(() {
|
||||
if (query.isEmpty) {
|
||||
_filteredBranches = _branches;
|
||||
} else {
|
||||
_filteredBranches = _branches.where((branch) {
|
||||
final lowerQuery = query.toLowerCase();
|
||||
return branch.name.toLowerCase().contains(lowerQuery) ||
|
||||
branch.code.toLowerCase().contains(lowerQuery) ||
|
||||
branch.ifsc.toLowerCase().contains(lowerQuery) ||
|
||||
branch.address.toLowerCase().contains(lowerQuery);
|
||||
}).toList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Scaffold(
|
||||
// appBar: AppBar(
|
||||
// title: Text(AppLocalizations.of(context).branchLocator),
|
||||
// ),
|
||||
// body: Center(
|
||||
// child: Column(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: [
|
||||
// Icon(
|
||||
// Icons.location_on,
|
||||
// size: 80,
|
||||
// color: Theme.of(context).primaryColor,
|
||||
// ),
|
||||
// const SizedBox(height: 16),
|
||||
// Text(
|
||||
// AppLocalizations.of(context).findnearbybranched,
|
||||
// style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
||||
// ),
|
||||
// const SizedBox(height: 24),
|
||||
// ElevatedButton.icon(
|
||||
// icon: const Icon(Icons.search),
|
||||
// label: Text( AppLocalizations.of(context).searchbranch),
|
||||
// onPressed: () {
|
||||
// // Place API here
|
||||
|
||||
// // ScaffoldMessenger.of(context).showSnackBar(
|
||||
// // SnackBar(content: Text( AppLocalizations.of(context).branchsearchsoon)),
|
||||
// // );
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context).branchLocator),
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
// Search bar
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
onChanged: _filterBranches,
|
||||
decoration: InputDecoration(
|
||||
hintText: AppLocalizations.of(context).searchbranchby,
|
||||
prefixIcon: const Icon(Icons.search),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
// List of branches
|
||||
Expanded(
|
||||
child: _filteredBranches.isEmpty
|
||||
? const Center(child: Text("No matching branches found"))
|
||||
: ListView.builder(
|
||||
itemCount: _filteredBranches.length,
|
||||
itemBuilder: (context, index) {
|
||||
final branch = _filteredBranches[index];
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(
|
||||
horizontal: 12, vertical: 6),
|
||||
child: ListTile(
|
||||
leading: Icon(Icons.location_city,
|
||||
color: Theme.of(context).primaryColor),
|
||||
title: Text(branch.name,
|
||||
style:
|
||||
const TextStyle(fontWeight: FontWeight.bold)),
|
||||
subtitle: Text(
|
||||
"Code: ${branch.code} | IFSC: ${branch.ifsc} \nBranch Address: ${branch.address}"),
|
||||
onTap: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text("Selected ${branch.name}")),
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@@ -1,3 +1,5 @@
|
||||
import 'package:kmobile/features/service/screens/branch_locator_screen.dart';
|
||||
|
||||
import '../../../l10n/app_localizations.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
@@ -70,7 +72,12 @@ class _ServiceScreen extends State<ServiceScreen> {
|
||||
ServiceManagementTile(
|
||||
icon: Symbols.missing_controller,
|
||||
label: AppLocalizations.of(context).branchLocator,
|
||||
onTap: () {},
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const BranchLocatorScreen()));
|
||||
},
|
||||
),
|
||||
const Divider(height: 1),
|
||||
],
|
||||
|
@@ -25,10 +25,10 @@
|
||||
"hi": "Hi",
|
||||
"kMobile": "kMobile",
|
||||
"scanBiometric": "Scan to enable Biometric login",
|
||||
"savingsAccount": "Savings Account",
|
||||
"loanAccount": "Loan Account",
|
||||
"termDeposit": "Term Deposit Account",
|
||||
"recurringDeposit": "Recurring Deposit Account",
|
||||
"savingsAccount": "Savings",
|
||||
"loanAccount": "Loan",
|
||||
"termDeposit": "Term Deposit",
|
||||
"recurringDeposit": "Recurring Deposit",
|
||||
"unknownAccount": "Unknown Account Type",
|
||||
"customerInfo": "Customer \n Info",
|
||||
"fundTransfer": "Fund \n Transfer",
|
||||
@@ -241,11 +241,54 @@
|
||||
"invalidRtgsPopUp": "RTGS transactions require a minimum amount of 200,000. Please enter a higher amount or select NEFT as the transaction mode.",
|
||||
"correctTpin": "Please Enter the correct TPIN",
|
||||
"insufficientFund": "Your account does not have sufficient balance",
|
||||
"creditedTo": "Credited To",
|
||||
"creditedTo": "Credit To",
|
||||
"selectTransactionType": "Select transaction Type",
|
||||
"proceed": "Proceed",
|
||||
"plsValidateBeneficiary": "Please validate beneficiary details first",
|
||||
"accno7to20": "Account number must be between 7 and 20 digits",
|
||||
"validateBeneficiaryproceeding": "Please validate beneficiary before proceeding"
|
||||
"validateBeneficiaryproceeding": "Please validate beneficiary before proceeding",
|
||||
"findnearbybranched": "Find nearby branches",
|
||||
"searchbranch": "Search Branch",
|
||||
"searchbranchby": "Search by Branch Name / Code / IFSC",
|
||||
"branchsearchsoon": "Branch search coming soon...",
|
||||
"loginFailed": "Login failed",
|
||||
"invalidCredentials": "Invalid credentials",
|
||||
"networkErrorDuringLogin": "Network error during login",
|
||||
"unexpectedErrorDuringLogin": "Unexpected error during login",
|
||||
"tokenRefreshFailed": "Token refresh failed",
|
||||
"failedToRefreshToken": "Failed to refresh token",
|
||||
"failedToCheckTpinStatus": "Failed to check TPIN status",
|
||||
"networkErrorDuringTpinCheck": "Network error during TPIN check",
|
||||
"unexpectedErrorDuringTpinCheck": "Unexpected error during TPIN check",
|
||||
"failedToSetTpin": "Failed to set TPIN",
|
||||
"networkErrorDuringTpinSetup": "Network error during TPIN setup",
|
||||
"unexpectedErrorDuringTpinSetup": "Unexpected error during TPIN setup",
|
||||
"failedToValidateBeneficiary": "Failed to validate beneficiary",
|
||||
"networkError": "Network error",
|
||||
"unexpectedError": "Unexpected error: ",
|
||||
"invalidIfscCode": "INVALID IFSC CODE",
|
||||
"invalidBeneficiaryDetails": "Invalid Beneficiary Details",
|
||||
"failedToFetchBeneficiaries": "Failed to fetch beneficiaries",
|
||||
"failedToDeleteBeneficiary": "Failed to delete beneficiary",
|
||||
"impsTransactionFailedWithStatusCode": "IMPS transaction failed with status code: ",
|
||||
"anUnexpectedErrorOccurred": "An unexpected error occurred: ",
|
||||
"neftTransactionFailedWithStatusCode": "NEFT transaction failed with status code: ",
|
||||
"unknownError": "Unknown error",
|
||||
"failedToProcessQuickPayWithinBank": "Failed to process quick pay within bank: ",
|
||||
"rtgsTransactionFailedWithStatusCode": "RTGS transaction failed with status code: ",
|
||||
"failedToLoadCustomerDetails": "Failed to load customer details",
|
||||
"routeNotFound": "Route not found!",
|
||||
"pleaseValidateBeneficiaryDetailsFirst": "Please validate beneficiary details first.",
|
||||
"beneficiaryAlreadyExists": "Beneficiary already exists",
|
||||
"pleaseEnterAValidAndMatchingAccountNumber": "Please enter a valid and matching account number.",
|
||||
"beneficiaryDeletedSuccessfully": "Beneficiary deleted successfully",
|
||||
"areYouSureYouWantToDeleteThisBeneficiary": "Are you sure you want to delete this beneficiary?",
|
||||
"yourAccountDoesNotHaveSufficientBalance": "Your account does not have sufficient balance",
|
||||
"green": "Green",
|
||||
"orange": "Orange",
|
||||
"deleteBeneficiary": "Delete Beneficiary",
|
||||
"beneficiarydetails": "Beneficiary Details",
|
||||
"delete": "Delete",
|
||||
"search": "Search",
|
||||
"viewCardDeatils": "View Card Details"
|
||||
}
|
||||
|
||||
|
@@ -241,10 +241,54 @@
|
||||
"invalidRtgsPopUp": "RTGS लेनदेन के लिए न्यूनतम 2,00,000 रुपये की राशि की आवश्यकता होती है। कृपया अधिक राशि दर्ज करें या लेनदेन मोड के रूप में NEFT चुनें",
|
||||
"correctTpin": "कृपया सही टी-पिन दर्ज करें",
|
||||
"insufficientFund": "आपके खाते में पर्याप्त शेष राशि नहीं है",
|
||||
"creditedTo": "को श्रेय दिया गया",
|
||||
"creditedTo": "को श्रेय",
|
||||
"selectTransactionType": "लेन-देन का प्रकार चुनें",
|
||||
"proceed": "आगे बढ़ना",
|
||||
"plsValidateBeneficiary": "कृपया पहले लाभार्थी विवरण सत्यापित करें",
|
||||
"accno7to20": "खाता संख्या सात से बीस अंकों के बीच होनी चाहिए",
|
||||
"validateBeneficiaryproceeding": "कृपया आगे बढ़ने से पहले लाभार्थी को पट्टे पर मान्य करें"
|
||||
"validateBeneficiaryproceeding": "कृपया आगे बढ़ने से पहले लाभार्थी को पट्टे पर मान्य करें",
|
||||
"findnearbybranched": "आस-पास की शाखाएँ खोजें",
|
||||
"searchbranch": "शाखा खोजें",
|
||||
"searchbranchby": "शाखा खोजें नाम / बैंक कोड / आईएफएससी द्वारा",
|
||||
"branchsearchsoon": "शाखा खोज सुविधा जल्द ही आ रही है...",
|
||||
"loginFailed": "लॉगिन विफल",
|
||||
"invalidCredentials": "अवैध प्रत्यय पत्र",
|
||||
"networkErrorDuringLogin": "लॉगिन के दौरान नेटवर्क त्रुटि",
|
||||
"unexpectedErrorDuringLogin": "लॉगिन के दौरान अप्रत्याशित त्रुटि",
|
||||
"tokenRefreshFailed": "टोकन ताज़ा विफल रहा",
|
||||
"failedToRefreshToken": "टोकन रीफ़्रेश करने में विफल",
|
||||
"failedToCheckTpinStatus": "टी-पिन स्थिति की जाँच करने में विफल",
|
||||
"networkErrorDuringTpinCheck": "टी-पिन जाँच के दौरान नेटवर्क त्रुटि",
|
||||
"unexpectedErrorDuringTpinCheck": "TPIN जाँच के दौरान अप्रत्याशित त्रुटि",
|
||||
"failedToSetTpin": "Tpin सेट करने में विफल",
|
||||
"networkErrorDuringTpinSetup": "Tpin सेटअप के दौरान नेटवर्क त्रुटि",
|
||||
"unexpectedErrorDuringTpinSetup": "TPIN सेटअप के दौरान अप्रत्याशित त्रुटि",
|
||||
"failedToValidateBeneficiary": "लाभार्थी को सत्यापित करने में विफल",
|
||||
"networkError": "नेटवर्क त्रुटि",
|
||||
"unexpectedError": "अप्रत्याशित त्रुटि:",
|
||||
"invalidIfscCode": "अमान्य IFSC कोड",
|
||||
"invalidBeneficiaryDetails": "अमान्य लाभार्थी विवरण",
|
||||
"failedToFetchBeneficiaries": "लाभार्थियों को प्राप्त करने में विफल",
|
||||
"failedToDeleteBeneficiary": "लाभार्थी को हटाने में विफल",
|
||||
"impsTransactionFailedWithStatusCode": "IMPS लेन-देन स्थिति कोड के साथ विफल:",
|
||||
"anUnexpectedErrorOccurred": "एक अप्रत्याशित त्रुटि हुई:",
|
||||
"neftTransactionFailedWithStatusCode": "NEFT लेन-देन स्थिति कोड के साथ विफल:",
|
||||
"unknownError": "अज्ञात त्रुटि",
|
||||
"failedToProcessQuickPayWithinBank": "बैंक के भीतर क्विक पे संसाधित करने में विफल:",
|
||||
"rtgsTransactionFailedWithStatusCode": "RTGS लेन-देन स्थिति कोड के साथ विफल:",
|
||||
"failedToLoadCustomerDetails": "ग्राहक विवरण लोड करने में विफल",
|
||||
"routeNotFound": "रूट नहीं मिला!",
|
||||
"pleaseValidateBeneficiaryDetailsFirst": "कृपया पहले लाभार्थी विवरण सत्यापित करें।",
|
||||
"beneficiaryAlreadyExists": "लाभार्थी पहले से मौजूद है",
|
||||
"pleaseEnterAValidAndMatchingAccountNumber": "कृपया एक मान्य और मिलान करने वाला खाता संख्या दर्ज करें।",
|
||||
"beneficiaryDeletedSuccessfully": "लाभार्थी सफलतापूर्वक हटाया गया।",
|
||||
"areYouSureYouWantToDeleteThisBeneficiary": "क्या आप वाकई इस लाभार्थी को हटाना चाहते हैं?",
|
||||
"yourAccountDoesNotHaveSufficientBalance": "आपके खाते में पर्याप्त शेष राशि नहीं है",
|
||||
"green": "हरा",
|
||||
"orange": "नारंगी",
|
||||
"deleteBeneficiary": "लाभार्थी हटाएं",
|
||||
"beneficiarydetails": "लाभार्थी विवरण",
|
||||
"delete": "मिटाओ",
|
||||
"search": "खोजें",
|
||||
"viewCardDeatils": "कार्ड विवरण देखें"
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,724 +0,0 @@
|
||||
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';
|
||||
|
||||
@override
|
||||
String get themeColor => 'Theme Color';
|
||||
|
||||
@override
|
||||
String get selectThemeColor => 'Select Theme Color';
|
||||
|
||||
@override
|
||||
String get violet => 'Violet';
|
||||
|
||||
@override
|
||||
String get blue => 'Blue';
|
||||
|
||||
@override
|
||||
String get invalidIfsc => 'Invalid IFSC code';
|
||||
|
||||
@override
|
||||
String get validIfsc => 'Valid IFSC';
|
||||
|
||||
@override
|
||||
String get beneficiaryAddedSuccess => 'Beneficiary Added Successfully';
|
||||
|
||||
@override
|
||||
String get beneficiaryAdditionFailed => 'Beneficiary Addition Failed';
|
||||
|
||||
@override
|
||||
String get noBeneficiaryFound => 'No beneficiaries found';
|
||||
|
||||
@override
|
||||
String get beneficiaryName => 'Beneficiary Name';
|
||||
|
||||
@override
|
||||
String get validateBeneficiary => 'Validate Beneficiary';
|
||||
|
||||
@override
|
||||
String get themeMode => 'Theme Mode';
|
||||
|
||||
@override
|
||||
String get transactionDetails => 'Transaction Details';
|
||||
|
||||
@override
|
||||
String get transactionType => 'Transaction Type';
|
||||
|
||||
@override
|
||||
String get transferType => 'Transfer Type';
|
||||
|
||||
@override
|
||||
String get utrNo => 'UTR No.';
|
||||
|
||||
@override
|
||||
String get beneficiaryAccountNo => 'Beneficiary Account No.';
|
||||
|
||||
@override
|
||||
String get invalidRtgs => 'Invalid Amount for RTGS';
|
||||
|
||||
@override
|
||||
String get invalidRtgsPopUp =>
|
||||
'RTGS transactions require a minimum amount of 200,000. Please enter a higher amount or select NEFT as the transaction mode.';
|
||||
|
||||
@override
|
||||
String get correctTpin => 'Please Enter the correct TPIN';
|
||||
|
||||
@override
|
||||
String get insufficientFund =>
|
||||
'Your account does not have sufficient balance';
|
||||
|
||||
@override
|
||||
String get creditedTo => 'Credited To';
|
||||
|
||||
@override
|
||||
String get selectTransactionType => 'Select transaction Type';
|
||||
|
||||
@override
|
||||
String get proceed => 'Proceed';
|
||||
|
||||
@override
|
||||
String get plsValidateBeneficiary =>
|
||||
'Please validate beneficiary details first';
|
||||
|
||||
@override
|
||||
String get accno7to20 => 'Account number must be between 7 and 20 digits';
|
||||
|
||||
@override
|
||||
String get validateBeneficiaryproceeding =>
|
||||
'Please validate beneficiary before proceeding';
|
||||
}
|
@@ -1,725 +0,0 @@
|
||||
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 => 'कांगड़ा सेंट्रल को-ऑपरेटिव बैंक';
|
||||
|
||||
@override
|
||||
String get themeColor => 'थीम रंग';
|
||||
|
||||
@override
|
||||
String get selectThemeColor => 'थीम रंग चुनें';
|
||||
|
||||
@override
|
||||
String get violet => 'बैंगनी';
|
||||
|
||||
@override
|
||||
String get blue => 'नीला';
|
||||
|
||||
@override
|
||||
String get invalidIfsc => 'अमान्य IFSC कोड';
|
||||
|
||||
@override
|
||||
String get validIfsc => 'मान्य IFSC';
|
||||
|
||||
@override
|
||||
String get beneficiaryAddedSuccess => 'लाभार्थी सफलतापूर्वक जोड़ा गया';
|
||||
|
||||
@override
|
||||
String get beneficiaryAdditionFailed => 'लाभार्थी जोड़ने में विफल';
|
||||
|
||||
@override
|
||||
String get noBeneficiaryFound => 'कोई लाभार्थी नहीं मिला';
|
||||
|
||||
@override
|
||||
String get beneficiaryName => 'लाभार्थी नाम';
|
||||
|
||||
@override
|
||||
String get validateBeneficiary => 'लाभार्थी को सत्यापित करें';
|
||||
|
||||
@override
|
||||
String get themeMode => 'थीम मोड';
|
||||
|
||||
@override
|
||||
String get transactionDetails => 'लेन-देन विवरण';
|
||||
|
||||
@override
|
||||
String get transactionType => 'लेनदेन प्रकार';
|
||||
|
||||
@override
|
||||
String get transferType => 'स्थानांतरण प्रकार';
|
||||
|
||||
@override
|
||||
String get utrNo => 'यूटीआर नंबर';
|
||||
|
||||
@override
|
||||
String get beneficiaryAccountNo => 'लाभार्थी खाता संख्या';
|
||||
|
||||
@override
|
||||
String get invalidRtgs => 'RTGS के लिए अमान्य राशि';
|
||||
|
||||
@override
|
||||
String get invalidRtgsPopUp =>
|
||||
'RTGS लेनदेन के लिए न्यूनतम 2,00,000 रुपये की राशि की आवश्यकता होती है। कृपया अधिक राशि दर्ज करें या लेनदेन मोड के रूप में NEFT चुनें';
|
||||
|
||||
@override
|
||||
String get correctTpin => 'कृपया सही टी-पिन दर्ज करें';
|
||||
|
||||
@override
|
||||
String get insufficientFund => 'आपके खाते में पर्याप्त शेष राशि नहीं है';
|
||||
|
||||
@override
|
||||
String get creditedTo => 'को श्रेय दिया गया';
|
||||
|
||||
@override
|
||||
String get selectTransactionType => 'लेन-देन का प्रकार चुनें';
|
||||
|
||||
@override
|
||||
String get proceed => 'आगे बढ़ना';
|
||||
|
||||
@override
|
||||
String get plsValidateBeneficiary =>
|
||||
'कृपया पहले लाभार्थी विवरण सत्यापित करें';
|
||||
|
||||
@override
|
||||
String get accno7to20 => 'खाता संख्या सात से बीस अंकों के बीच होनी चाहिए';
|
||||
|
||||
@override
|
||||
String get validateBeneficiaryproceeding =>
|
||||
'कृपया आगे बढ़ने से पहले लाभार्थी को पट्टे पर मान्य करें';
|
||||
}
|
@@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:jailbreak_root_detection/jailbreak_root_detection.dart';
|
||||
import 'package:kmobile/rooted_screen.dart';
|
||||
import 'di/injection.dart';
|
||||
import 'app.dart';
|
||||
|
||||
@@ -14,5 +16,17 @@ void main() async {
|
||||
|
||||
// Initialize dependencies
|
||||
await setupDependencies();
|
||||
|
||||
final isJailBroken = await JailbreakRootDetection.instance.isJailBroken;
|
||||
final isRealDevice = await JailbreakRootDetection.instance.isRealDevice;
|
||||
if(isJailBroken || !isRealDevice){
|
||||
runApp(const MaterialApp(
|
||||
home: RootedScreen(),
|
||||
debugShowCheckedModeBanner: false,
|
||||
)
|
||||
);
|
||||
}
|
||||
else{
|
||||
runApp(const KMobile());
|
||||
}
|
||||
}
|
||||
|
56
lib/rooted_screen.dart
Normal file
56
lib/rooted_screen.dart
Normal file
@@ -0,0 +1,56 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class RootedScreen extends StatelessWidget {
|
||||
const RootedScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.black,
|
||||
body: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(
|
||||
Icons.warning_amber_rounded,
|
||||
color: Colors.red,
|
||||
size: 80,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
const Text(
|
||||
"Rooted Device Detected",
|
||||
style: TextStyle(
|
||||
color: Colors.red,
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
const Text(
|
||||
"For security reasons, this app cannot run on rooted devices.",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white70,
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.red,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
onPressed: () {
|
||||
// Optionally close the app
|
||||
},
|
||||
child: const Text("Exit"),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
81
lib/widgets/bank_logos.dart
Normal file
81
lib/widgets/bank_logos.dart
Normal file
@@ -0,0 +1,81 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
Widget getBankLogo(String? bankName) {
|
||||
if (bankName != null && bankName.toLowerCase().contains('state bank of')) {
|
||||
return Image.asset(
|
||||
'assets/images/sbi_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('kangra central')) {
|
||||
return Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('hdfc bank ltd')) {
|
||||
return Image.asset(
|
||||
'assets/images/hdfc_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('icici bank ltd')) {
|
||||
return Image.asset(
|
||||
'assets/images/icici_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null &&
|
||||
bankName.toLowerCase().contains('punjab national bank')) {
|
||||
return Image.asset(
|
||||
'assets/images/pnb_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('axis')) {
|
||||
return Image.asset(
|
||||
'assets/images/axisBank_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('baroda')) {
|
||||
return Image.asset(
|
||||
'assets/images/bankofBaroda_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('canara bank')) {
|
||||
return Image.asset(
|
||||
'assets/images/canaraBank_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('kotak')) {
|
||||
return Image.asset(
|
||||
'assets/images/kotak_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
}
|
||||
if (bankName != null && bankName.toLowerCase().contains('bank of india')) {
|
||||
return Image.asset(
|
||||
'assets/images/boi_logo.png',
|
||||
width: 40,
|
||||
height: 40,
|
||||
);
|
||||
} else {
|
||||
return const Icon(
|
||||
Icons.account_balance,
|
||||
size: 40,
|
||||
color: Colors.grey,
|
||||
);
|
||||
}
|
||||
}
|
@@ -357,6 +357,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.19.0"
|
||||
jailbreak_root_detection:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: jailbreak_root_detection
|
||||
sha256: c611229940a09785bd686364e92a40b07724926d2496c931527805101eb3da86
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.1.6"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@@ -59,6 +59,8 @@ dependencies:
|
||||
lottie: ^2.6.0
|
||||
share_plus: ^7.2.1
|
||||
confetti: ^0.7.0
|
||||
jailbreak_root_detection: "^1.1.6"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -96,6 +98,7 @@ flutter:
|
||||
- assets/images/BankofBaroda_logo.png
|
||||
- assets/images/canaraBank_logo.png
|
||||
- assets/images/kotak_logo.png
|
||||
- assets/images/boi_logo.png
|
||||
- assets/images/kmobile_splash.jpg
|
||||
- assets/images/kmobile_splash2.png
|
||||
- assets/images/icon.svg
|
||||
|
Reference in New Issue
Block a user