by Anonymous » 14 Feb 2025, 10:39
Ich verwende das einfache Lokalisierungspaket in 2 Sprachenanwendung, und ich muss Langauge mit einer Taste schwingen. Wie könnte ich das machen? < /P>
Code: Select all
await EasyLocalization.ensureInitialized();
log(token);
runApp(
EasyLocalization(
supportedLocales: const [Locale('ar'), Locale('en')],
path: 'assets/translations',
startLocale: const Locale('ar'),
fallbackLocale: const Locale('en'),
saveLocale: true,
assetLoader: const CodegenLoader(),
child: ScreenUtilInit(
designSize: const Size(411.4, 683.4),
child: const MyApp(),
builder: (context, child) => child!,
),
),
);
Ich verwende das einfache Lokalisierungspaket in 2 Sprachenanwendung, und ich muss Langauge mit einer Taste schwingen. Wie könnte ich das machen? < /P>
[code] await EasyLocalization.ensureInitialized();
log(token);
runApp(
EasyLocalization(
supportedLocales: const [Locale('ar'), Locale('en')],
path: 'assets/translations',
startLocale: const Locale('ar'),
fallbackLocale: const Locale('en'),
saveLocale: true,
assetLoader: const CodegenLoader(),
child: ScreenUtilInit(
designSize: const Size(411.4, 683.4),
child: const MyApp(),
builder: (context, child) => child!,
),
),
);
[/code]