This commit is contained in:
Hamza-Ayed
2024-01-18 00:49:00 +03:00
parent 358bb904ab
commit 7af7e71b30
17 changed files with 1028 additions and 269 deletions

View File

@@ -7,6 +7,7 @@ import '../themes/themes.dart';
class LocaleController extends GetxController {
Locale? language;
String countryCode = '';
void restartApp() {
runApp(const MyApp());
}
@@ -30,11 +31,13 @@ class LocaleController extends GetxController {
break;
default:
locale = Locale(Get.deviceLocale!.languageCode);
appTheme = themeEnglish;
break;
}
box.write(BoxName.lang, langcode);
// box.write(BoxName.lang, langcode);
Get.changeTheme(appTheme);
Get.updateLocale(locale);
restartApp();