Localization Changes #6

This commit is contained in:
2025-09-10 11:43:15 +05:30
parent dd7b7a6f4c
commit e4e104837b
5 changed files with 35 additions and 14 deletions

View File

@@ -65,8 +65,8 @@ Dio _createDioClient() {
final dio = Dio(
BaseOptions(
baseUrl:
//'http://lb-test-mobile-banking-app-192209417.ap-south-1.elb.amazonaws.com:8080',
'http://localhost:8081',
'http://lb-test-mobile-banking-app-192209417.ap-south-1.elb.amazonaws.com:8080',
//'http://localhost:8081',
// 'http://localhost:8082',
connectTimeout: const Duration(seconds: 5),
receiveTimeout: const Duration(seconds: 10),

View File

@@ -1,21 +1,34 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:kmobile/features/auth/controllers/theme_mode_cubit.dart';
import '../../../l10n/app_localizations.dart';
String _getThemeModeText(ThemeMode mode, AppLocalizations l10n) {
switch (mode) {
case ThemeMode.system:
return l10n.themeModeSystem;
case ThemeMode.light:
return l10n.themeModeLight;
case ThemeMode.dark:
return l10n.themeModeDark;
}
}
Future<void> showThemeModeDialog(BuildContext context) async {
final cubit = context.read<ThemeModeCubit>();
final currentMode = context.read<ThemeModeCubit>().state.mode;
final l10n = AppLocalizations.of(context);
await showDialog(
context: context,
builder: (context) {
return AlertDialog(
title: const Text("Select Theme Mode"),
title: Text(l10n.selectThemeMode),
content: Column(
mainAxisSize: MainAxisSize.min,
children: ThemeMode.values.map((mode) {
return RadioListTile<ThemeMode>(
title: Text(mode.toString().split('.').last.toUpperCase()),
title: Text(_getThemeModeText(mode, l10n)),
value: mode,
groupValue: currentMode,
onChanged: (value) {
@@ -30,4 +43,4 @@ Future<void> showThemeModeDialog(BuildContext context) async {
);
},
);
}
}

View File

@@ -308,5 +308,9 @@
"otpVerification": "OTP Verification",
"otpSent": "An OTP has been sent to your registered mobile number.",
"enterOTP": "Enter OTP",
"validateOTP": "Validate OTP"
"validateOTP": "Validate OTP",
"selectThemeMode": "Select Theme Mode",
"themeModeSystem": "System",
"themeModeLight": "Light",
"themeModeDark": "Dark"
}

View File

@@ -309,5 +309,9 @@
"otpVerification": "ओटीपी सत्यापन",
"otpSent": "आपके पंजीकृत मोबाइल नंबर पर एक ओटीपी भेजा गया है।",
"enterOTP": "ओटीपी दर्ज करें",
"validateOTP": "ओटीपी सत्यापित करें"
"validateOTP": "ओटीपी सत्यापित करें",
"selectThemeMode": "थीम मोड चुनें",
"themeModeSystem": "सिस्टम",
"themeModeLight": "लाईट",
"themeModeDark": "डार्क"
}

View File

@@ -17,13 +17,13 @@ void main() async {
]);
// Check for device compromise
final compromisedMessage = await SecurityService.deviceCompromisedMessage;
if (compromisedMessage != null) {
runApp(MaterialApp(
home: SecurityErrorScreen(message: compromisedMessage),
));
return;
}
// final compromisedMessage = await SecurityService.deviceCompromisedMessage;
// if (compromisedMessage != null) {
// runApp(MaterialApp(
// home: SecurityErrorScreen(message: compromisedMessage),
// ));
// return;
// }
// Initialize dependencies
await setupDependencies();