-
-
Notifications
You must be signed in to change notification settings - Fork 324
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
Black screen between splash screen and first screen #380
Comments
I was having this issue too, the only way I could solve was to use code generation and instead of loading the json file from assets I used the generated class. |
did you guys face this issue for ios side, ? |
A problem is when set |
its because preloader widget was been removed from 3.0.0 https://github.com/aissat/easy_localization/blob/develop/CHANGELOG.md#300 Add your own colored background widget or use your own solution ColoredBox(
color: Colors.red,
child: EasyLocalization( |
The blinking appears because the localization is loaded asynchronously and when it is not there, the app bg is shown(black) |
I have same issue fixed as below, Here is my code, return FutureBuilder<bool>(
future: changeLocale(
context: context,
languageCode: languageCode,
),
builder: (context, snapshot) {
if (snapshot.data == null) {
return SafeArea(
child: Scaffold(
body: progressLoading(),
),
);
}
return SplashScreen();
},
);
. Future<bool> changeLocale({
required BuildContext context,
required String languageCode,
}) async {
Future<bool> _setLocale() async {
await context.setLocale(
getLocaleByCountry(languageCode)!,
);
return true;
}
return await _setLocale();
}
|
Nice package but I can not use it because of this. The problem as @Overman775 says its related to asyncronously locale load. The solution I found was following exactly what it is described at the official flutter doc: |
Is there any solution to show preloader widget? In previous version, this was available |
The problem occurs when my JSON file becomes too large, as I delete at least 5 random keys and it works perfectly again.
The text was updated successfully, but these errors were encountered: