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

Retrieve the current device locale and initialize it before runApp #15

Closed
wants to merge 2 commits into from

Conversation

SiyrisSoul
Copy link

Fixes issue #13 and possibly #14 but I don't have an iOS device to test on. Takes into account if there are preferences on the device and if not loads the device locale.

SiyrisSoul and others added 2 commits October 29, 2019 13:58
… there are no preferences

Fixes black screen flash
@bratan
Copy link
Member

bratan commented Oct 30, 2019

I just did some tests on both iOS simulator and an iPhone and there are some issues.

On iOS, in release mode, the Platform.localeName returns null and it seems this is intended, based on flutter/flutter#24747

In debug mode, it always returns the region locale, instead of the selected language, so here we have the issue from #14.

So basically this would only fix the black screen on Android for #13

I`m going to do some more tests today and probably implement a platform channel call for iOS to retrieve the current device language during startup.

@SiyrisSoul
Copy link
Author

Thanks for making me aware of that behavior! I need to get an iOS device now I suppose 😬

@SiyrisSoul
Copy link
Author

I just did some tests on both iOS simulator and an iPhone and there are some issues.

On iOS, in release mode, the Platform.localeName returns null and it seems this is intended, based on flutter/flutter#24747

In debug mode, it always returns the region locale, instead of the selected language, so here we have the issue from #14.

So basically this would only fix the black screen on Android for #13

I`m going to do some more tests today and probably implement a platform channel call for iOS to retrieve the current device language during startup.

Any update on this? If you are busy I could implement the platform channel call, but you would have to test it as I don't have a way to test on iOS :)

@bratan
Copy link
Member

bratan commented Nov 5, 2019

I`m going to implement it most likely tomorrow.

@bratan
Copy link
Member

bratan commented Nov 9, 2019

@TutOsirisOm - It's done. We now have a consistent implementation for both Android/iOS.

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

Successfully merging this pull request may close these issues.

None yet

2 participants