3 changes
This commit is contained in:
15
lib/app.dart
15
lib/app.dart
@@ -13,7 +13,6 @@ 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/splash_screen.dart';
|
||||
import 'features/auth/screens/login_screen.dart';
|
||||
import 'features/service/screens/service_screen.dart';
|
||||
import 'features/dashboard/screens/dashboard_screen.dart';
|
||||
@@ -37,7 +36,6 @@ class KMobile extends StatefulWidget {
|
||||
|
||||
class _KMobileState extends State<KMobile> with WidgetsBindingObserver {
|
||||
Timer? _backgroundTimer;
|
||||
bool showSplash = true;
|
||||
Locale? _locale;
|
||||
|
||||
@override
|
||||
@@ -45,11 +43,6 @@ class _KMobileState extends State<KMobile> with WidgetsBindingObserver {
|
||||
super.initState();
|
||||
WidgetsBinding.instance.addObserver(this);
|
||||
loadPreferences();
|
||||
Future.delayed(const Duration(seconds: 3), () {
|
||||
setState(() {
|
||||
showSplash = false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -133,7 +126,7 @@ class _KMobileState extends State<KMobile> with WidgetsBindingObserver {
|
||||
themeMode: context.watch<ThemeModeCubit>().state.mode,
|
||||
onGenerateRoute: AppRoutes.generateRoute,
|
||||
initialRoute: AppRoutes.splash,
|
||||
home: showSplash ? const SplashScreen() : const AuthGate(),
|
||||
home: const AuthGate(),
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -205,7 +198,7 @@ class _AuthGateState extends State<AuthGate> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (_checking) {
|
||||
return const SplashScreen();
|
||||
return const LoginScreen();
|
||||
}
|
||||
if (_isLoggedIn) {
|
||||
if (_hasMPin) {
|
||||
@@ -214,7 +207,7 @@ class _AuthGateState extends State<AuthGate> {
|
||||
future: _tryBiometric(),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const SplashScreen();
|
||||
return const LoginScreen();
|
||||
}
|
||||
if (snapshot.data == true) {
|
||||
return const NavigationScaffold();
|
||||
@@ -422,7 +415,7 @@ class BiometricPromptScreen extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
Future.microtask(() => _showDialog(context));
|
||||
return const SplashScreen();
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
Future<void> _showDialog(BuildContext context) async {
|
||||
|
||||
@@ -100,9 +100,11 @@ class _AccountStatementScreen extends State<AccountStatementScreen> {
|
||||
final maxToDate = fromDate!.add(const Duration(days: 183)).isBefore(now)
|
||||
? fromDate!.add(const Duration(days: 183))
|
||||
: now;
|
||||
final initialToDate = toDate ?? now;
|
||||
final clampedInitialToDate = initialToDate.isBefore(fromDate!) ? fromDate! : initialToDate;
|
||||
final picked = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: toDate ?? fromDate!,
|
||||
initialDate: clampedInitialToDate,
|
||||
firstDate: fromDate!,
|
||||
lastDate: maxToDate,
|
||||
);
|
||||
|
||||
@@ -91,7 +91,7 @@ class _CustomerInfoScreenState extends State<CustomerInfoScreen> {
|
||||
value: user.branchId ?? 'N/A',
|
||||
),
|
||||
InfoField(
|
||||
label: AppLocalizations.of(context).branchAddress,
|
||||
label: AppLocalizations.of(context).address,
|
||||
value: user.address ?? 'N/A',
|
||||
), // Replace with Aadhar if available
|
||||
InfoField(
|
||||
|
||||
@@ -404,5 +404,6 @@
|
||||
"postOffice": "Post Office",
|
||||
"rbiCode1": "RBI Code 1",
|
||||
"rbiCode2": "RBI Code 2",
|
||||
"latitude": "Latitude"
|
||||
"latitude": "Latitude",
|
||||
"address": "Customer Address"
|
||||
}
|
||||
|
||||
@@ -405,5 +405,6 @@
|
||||
"postOffice": "डाकघर",
|
||||
"rbiCode1": "आरबीआई कोड 1",
|
||||
"rbiCode2": "आरबीआई कोड 2",
|
||||
"latitude": "अक्षांश"
|
||||
"latitude": "अक्षांश",
|
||||
"address": "ग्राहक का पता"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user