Closed Abodysoma2021 closed 2 years ago
Could you share your main()
implementation please
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Initilize Localization With localize_and_translate Package
await translator.init(
localeType: LocalizationDefaultType.device,
languagesList:
//hello class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { //Wrap Application With Getx Package return GetMaterialApp( initialBinding: Binding(), // initialRoute: homeController.initScreen == 0 ? OnboardingScreen() :HomeView(), debugShowCheckedModeBanner: false, title: 'Moya App', theme: ThemeData( primarySwatch: AppStyles.primaryColor, scaffoldBackgroundColor: AppStyles.backgroundColor, fontFamily: 'Sfpro'), home: ControlView(), localizationsDelegates: translator.delegates, // Android + iOS Delegates locale: translator.activeLocale, // Active locale supportedLocales: translator.locals(), // Locals list ); } }
Could you share your
main()
implementation please
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Initilize Localization With localize_and_translate Package
await translator.init(
localeType: LocalizationDefaultType.device,
languagesList:
//hello class MyApp extends StatelessWidget { // This widget is the root of your application. @override Widget build(BuildContext context) { //Wrap Application With Getx Package return GetMaterialApp( initialBinding: Binding(), // initialRoute: homeController.initScreen == 0 ? OnboardingScreen() :HomeView(), debugShowCheckedModeBanner: false, title: 'Moya App', theme: ThemeData( primarySwatch: AppStyles.primaryColor, scaffoldBackgroundColor: AppStyles.backgroundColor, fontFamily: 'Sfpro'), home: ControlView(), localizationsDelegates: translator.delegates, // Android + iOS Delegates locale: translator.activeLocale, // Active locale supportedLocales: translator.locals(), // Locals list ); } }
Thanks for sharing,
and how do you call setNewLanguage()
, what parameters did you use.
Thanks for sharing,
and how do you call
setNewLanguage()
, what parameters did you use.
You are using the latest version 4.1.1
correct!
Forgive me for the late response, I'm working on the next localization package (palestine_localization) with so many new features.
Please test different versions from the one you are using right now
Please test different versions from the one you are using right now
Yes I Have Change The Version To 4.0.0 And It Work Fine Thanks