Skip to content

fix: iOS not respecting uiMode theme setting#15

Open
ecugol wants to merge 1 commit intoottuco:mainfrom
ecugol:fix/ios-uimode-support
Open

fix: iOS not respecting uiMode theme setting#15
ecugol wants to merge 1 commit intoottuco:mainfrom
ecugol:fix/ios-uimode-support

Conversation

@ecugol
Copy link

@ecugol ecugol commented Jan 8, 2026

Hey!

I noticed that setting uiMode: CustomerUiMode.light in 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 CustomerTheme has a uiMode field that gets decoded but is never actually used anywhere.

This PR adds the missing piece - it applies overrideUserInterfaceStyle to the payment view controller based on the uiMode value.

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!

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
@ecugol
Copy link
Author

ecugol commented Jan 25, 2026

@jab3z Please check this PR

@jab3z
Copy link
Contributor

jab3z commented Jan 26, 2026

@ecugol its under testing.

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.

2 participants