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 problem when opening the app. #96
Comments
@hkndzdr u mean this #74 and about black screen check this flutter/flutter#47582 |
There is no such problem in the flutter default sample application. There is no problem in any application where I don't integrate the Easy_localization plug-in. If I remove the plug-in from the application, the problem is resolved. Trying what is written here (flutter/flutter#47582) isn't a solution for me. I also tried all of them one by one. |
Screenshot from the EasyLocalizationState class If you wrapped the EasyLocalization top level Widget with another Container Widget its color white you will see white screen instead of black screen, The problem as you see in the screenshot is that the FutureBuilder Widget returns a Container Widget represents the top level Widget of your app and that Container has a transparent background color as default so what appears until the easy localization FutureBuilder get completed is a transparent Container no thing above it and no thing in flutter means black. Try what i have done here and your problem is solved. So @aissat that Container in the FutureBuilder shouldn't be hard codded like that, It should be handled with a parameter like that. |
Thanks for your descriptive answer. An effective method as a workaround. I have not insisted in vain that this problem is not something special to me. In the issues that have already been closed (#26, # 40), the same problem has been raised by different users. Your suggestion for the solution is quite logical. Hopefully it will be fixed in a short time |
@AlaaEldeenYsr thnx for this details |
Do you need help? |
@Overman775 yeah;) |
@aissat @Overman775 |
|
@hkndzdr I cannot reproduct this. The EasyLocalization widget is not doing any blocking/asynchronous tasks any more. Can you share your sourcecode? |
I share videos instead of code. I used the Sample application in the repo. |
I have same bug,not always.... catch on 10 attempt
|
Yes. The situation changes according to the current memory load of the device. I shared the image on the emulator so you can look clear. |
@Overman775 the flickering is due to the async/non blocking shared preference language loading. The red screen is a mistery to me. Maybe we need to separate the use cases for using the system locale and saving/loading a custom local at a higher level to avoid this kind of behavior... |
@moritzmorgenroth Yep, latest 2.0.2 Text flickering cannot be deleted because we are use async loading from the asset |
@aissat @Overman775 would you prefer a loader widget? We could go back to loader, but then we should make sure that async/blocking behavior is only happening if the |
@aissat @moritzmorgenroth If we get back to FutureBuilder then need to track three parameters:
|
|
@aissat @moritzmorgenroth can try the idea catch widget.children #102 |
I think the most convenient / efficient solution would be to adjust the documentation, only setting |
I think the use cases are so inherently different that they need stronger distinction. I have a clear picture in my head, dont know if ill find time to implement it before the weekend though... |
#103 coz asset loader, |
You updated the package and didn't provide any way for handling the loading operation ? |
@hkndzdr Black screen is only in develop version, i test on 6 years old android phone, all fine ;) |
I'm glad to hear that.. |
Using the sample application in the repo, I recorded a video showing the error in both the emulator and the real device. You can see the obvious error in the emulator. It happens very fast on the real device. You can see 16,22 and 26 seconds in the video by watching at a speed of 0.25. Occurs when getting locale values from shared preferences. I have the same problem in my own applications where installed the this plugin. An extremely frustrating situation.
https://www.youtube.com/watch?v=idAvuFG6BmI
The text was updated successfully, but these errors were encountered: