Localization Changes #6
This commit is contained in:
@@ -65,8 +65,8 @@ Dio _createDioClient() {
|
|||||||
final dio = Dio(
|
final dio = Dio(
|
||||||
BaseOptions(
|
BaseOptions(
|
||||||
baseUrl:
|
baseUrl:
|
||||||
//'http://lb-test-mobile-banking-app-192209417.ap-south-1.elb.amazonaws.com:8080',
|
'http://lb-test-mobile-banking-app-192209417.ap-south-1.elb.amazonaws.com:8080',
|
||||||
'http://localhost:8081',
|
//'http://localhost:8081',
|
||||||
// 'http://localhost:8082',
|
// 'http://localhost:8082',
|
||||||
connectTimeout: const Duration(seconds: 5),
|
connectTimeout: const Duration(seconds: 5),
|
||||||
receiveTimeout: const Duration(seconds: 10),
|
receiveTimeout: const Duration(seconds: 10),
|
||||||
|
@@ -1,21 +1,34 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
import 'package:kmobile/features/auth/controllers/theme_mode_cubit.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 {
|
Future<void> showThemeModeDialog(BuildContext context) async {
|
||||||
final cubit = context.read<ThemeModeCubit>();
|
final cubit = context.read<ThemeModeCubit>();
|
||||||
final currentMode = context.read<ThemeModeCubit>().state.mode;
|
final currentMode = context.read<ThemeModeCubit>().state.mode;
|
||||||
|
final l10n = AppLocalizations.of(context);
|
||||||
|
|
||||||
await showDialog(
|
await showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) {
|
builder: (context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: const Text("Select Theme Mode"),
|
title: Text(l10n.selectThemeMode),
|
||||||
content: Column(
|
content: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: ThemeMode.values.map((mode) {
|
children: ThemeMode.values.map((mode) {
|
||||||
return RadioListTile<ThemeMode>(
|
return RadioListTile<ThemeMode>(
|
||||||
title: Text(mode.toString().split('.').last.toUpperCase()),
|
title: Text(_getThemeModeText(mode, l10n)),
|
||||||
value: mode,
|
value: mode,
|
||||||
groupValue: currentMode,
|
groupValue: currentMode,
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
@@ -30,4 +43,4 @@ Future<void> showThemeModeDialog(BuildContext context) async {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
@@ -308,5 +308,9 @@
|
|||||||
"otpVerification": "OTP Verification",
|
"otpVerification": "OTP Verification",
|
||||||
"otpSent": "An OTP has been sent to your registered mobile number.",
|
"otpSent": "An OTP has been sent to your registered mobile number.",
|
||||||
"enterOTP": "Enter OTP",
|
"enterOTP": "Enter OTP",
|
||||||
"validateOTP": "Validate OTP"
|
"validateOTP": "Validate OTP",
|
||||||
|
"selectThemeMode": "Select Theme Mode",
|
||||||
|
"themeModeSystem": "System",
|
||||||
|
"themeModeLight": "Light",
|
||||||
|
"themeModeDark": "Dark"
|
||||||
}
|
}
|
||||||
|
@@ -309,5 +309,9 @@
|
|||||||
"otpVerification": "ओटीपी सत्यापन",
|
"otpVerification": "ओटीपी सत्यापन",
|
||||||
"otpSent": "आपके पंजीकृत मोबाइल नंबर पर एक ओटीपी भेजा गया है।",
|
"otpSent": "आपके पंजीकृत मोबाइल नंबर पर एक ओटीपी भेजा गया है।",
|
||||||
"enterOTP": "ओटीपी दर्ज करें",
|
"enterOTP": "ओटीपी दर्ज करें",
|
||||||
"validateOTP": "ओटीपी सत्यापित करें"
|
"validateOTP": "ओटीपी सत्यापित करें",
|
||||||
|
"selectThemeMode": "थीम मोड चुनें",
|
||||||
|
"themeModeSystem": "सिस्टम",
|
||||||
|
"themeModeLight": "लाईट",
|
||||||
|
"themeModeDark": "डार्क"
|
||||||
}
|
}
|
||||||
|
@@ -17,13 +17,13 @@ void main() async {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
// Check for device compromise
|
// Check for device compromise
|
||||||
final compromisedMessage = await SecurityService.deviceCompromisedMessage;
|
// final compromisedMessage = await SecurityService.deviceCompromisedMessage;
|
||||||
if (compromisedMessage != null) {
|
// if (compromisedMessage != null) {
|
||||||
runApp(MaterialApp(
|
// runApp(MaterialApp(
|
||||||
home: SecurityErrorScreen(message: compromisedMessage),
|
// home: SecurityErrorScreen(message: compromisedMessage),
|
||||||
));
|
// ));
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// Initialize dependencies
|
// Initialize dependencies
|
||||||
await setupDependencies();
|
await setupDependencies();
|
||||||
|
Reference in New Issue
Block a user