easy_localization restart the whole app every time I using hot reload

Viewed 189

I am using easy_localization for translations in my Flutter app. everything is fine but while developing every time I use hot reload the whole app is restarted.

The console shows that easy_localization is reinitialized when hot reload:

enter image description here

and this is my code:

  runApp(
    ProviderScope(
      overrides: [
        prefsProvider.overrideWithValue(prefs),
      ],
      child: EasyLocalization(
        supportedLocales: const [Locale('en')],
        path: 'assets/translations',
        fallbackLocale: const Locale('en', 'US'),
        child: const RavenApp(),
        saveLocale: true,
      ),
    ),
  );

Note: I tried to remove EasyLocalization and the issue despaired.

0 Answers
Related