24 lines
577 B
Dart
24 lines
577 B
Dart
|
|
import 'dart:ui';
|
|
import 'package:get/get.dart';
|
|
|
|
import '../../tools/store_service.dart';
|
|
import '../../translations/app_dept.dart';
|
|
|
|
class MineMultiLanguageState {
|
|
|
|
List<Locale> get languages {
|
|
return appDept.deptSupportedLocales;
|
|
}
|
|
|
|
var currentLanguageType = ExtensionLanguageType.fromLanguageCode(Get.locale.languageCode).obs;
|
|
|
|
AppLanuageConfigState() {
|
|
resetLan();
|
|
}
|
|
|
|
void resetLan() {
|
|
currentLanguageType.value = ExtensionLanguageType.fromLanguageCode(Get.locale.languageCode);
|
|
StoreService.to.saveLanguageCode(Get.locale.languageCode);
|
|
}
|
|
} |