Browse Source

fix: 修复应用本地化回退区域设置错误

使用静态常量 `fallbackLocale` 替代方法调用 `getSmartFallbackLocale()`,以避免潜在的运行时错误并确保回退区域设置的一致性。
weicu
lxm 8 months ago
parent
commit
04a1304fb0
  1. 2
      lib/main.dart

2
lib/main.dart

@ -197,7 +197,7 @@ class MainApp extends StatelessWidget {
GlobalCupertinoLocalizations.delegate, GlobalCupertinoLocalizations.delegate,
], ],
locale: AppTranslations.deviceLocale(), locale: AppTranslations.deviceLocale(),
fallbackLocale: AppTranslations.getSmartFallbackLocale(), fallbackLocale: AppTranslations.fallbackLocale,
supportedLocales: AppTranslations.supportedLocales, supportedLocales: AppTranslations.supportedLocales,
builder: EasyLoading.init( builder: EasyLoading.init(
builder: (BuildContext context, Widget? widget) { builder: (BuildContext context, Widget? widget) {

Loading…
Cancel
Save