fix: iOS not respecting uiMode theme setting#15
Open
ecugol wants to merge 1 commit intoottuco:mainfrom
Open
Conversation
The uiMode property in CustomerTheme was being decoded but never applied to the payment view controller. This caused the checkout UI to always follow the system appearance instead of respecting the Flutter theme configuration. This fix: - Stores the uiMode value from theme arguments - Applies overrideUserInterfaceStyle to the payment view controller - Supports 'light', 'dark', or auto (system default) modes
Author
|
@jab3z Please check this PR |
Contributor
|
@ecugol its under testing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey!
I noticed that setting
uiMode: CustomerUiMode.lightin the Flutter theme doesn't actually work on iOS. The checkout always follows the system dark/light mode instead.After digging through the code, I found that
CustomerThemehas auiModefield that gets decoded but is never actually used anywhere.This PR adds the missing piece - it applies
overrideUserInterfaceStyleto the payment view controller based on theuiModevalue.Tested by setting my phone to dark mode and confirming the checkout now shows in light mode when configured that way.
Let me know if I'm missing something or if there's a better way to do this!