Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 4.0.0 #619

Open
aissat opened this issue Sep 10, 2023 · 0 comments
Open

version 4.0.0 #619

aissat opened this issue Sep 10, 2023 · 0 comments

Comments

@aissat
Copy link
Owner

aissat commented Sep 10, 2023

Overview:

In this major version release (v4) of the code, several significant changes have been introduced to enhance the functionality and maintainability of the application.

v 3.0.0

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyLocalization.ensureInitialized();
  
  runApp(
    EasyLocalization(
      supportedLocales: [Locale('en', 'US'), Locale('de', 'DE')],
      path: 'assets/translations', 
      child: MyApp()
    ),
  );
}

v 4.0.0

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
 await EasyLocalization.ensureInitialized(assetLoader: RootBundleAssetLoader(path: 'resources/langs/json'));
 // or await EasyLocalization.ensureInitialized(); //  assetLoader if null has default value
  
  runApp(
    EasyLocalization(
      child: MyApp()
    ),
  );
}

....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant