- Notifications
You must be signed in to change notification settings - Fork29.3k
iOS can set application locale before view controller is set#176592
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Code Review
This pull request modifiesPlatformViewIOS
to allow setting the application locale even before aFlutterViewController
is attached. It achieves this by caching the locale in a newapplication_locale_
member variable and applying it when the view controller is set. The change also includes a new unit test to verify this behavior. My review provides suggestions to improve code maintainability by refactoring duplicated logic and to fix a potential syntax error in the new test.
engine/src/flutter/shell/platform/darwin/ios/platform_view_ios_test.mm OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
engine/src/flutter/shell/platform/darwin/ios/platform_view_ios.mm OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
fixes#176478
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel onDiscord.
Note: The Flutter team is currently trialing the use ofGemini Code Assist for GitHub. Comments from the
gemini-code-assist
bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.