Closed trietbui85 closed 4 years ago
Hi @anticafe, there is no lazy loading functionality currently. The delay is caused by the initial access to the asset files. In debug mode is a bit slower but in release mode the delay should only be ~5ms.
I suggest showing a splash screen while waiting for the app to load.
https://flutter.dev/docs/development/ui/splash-screen/android-splash-screen
release mode the delay should only be ~5ms
It sounds good, less than a frame (16.67ms), thus no one will notice that.
I follow the guide to configure the flutter_translate:
It takes about 263ms (debug build, Galaxy S9 Android 10) to create the
LocalizationDelegate
. Thus, I wonder if you have another way to lazy create it?For example: let
runApp(myApp())
first, then show a loading screen while waiting for creating theLocalizationDelegate
. After it's done, then show the next screen.That idea is borrowed from GetIt > allReady method. I'm not sure if you can apply that into flutter_translate.
Library info:
Finally, thanks for your great library. I'm using it in all 4 projects. 💯