Feature request: support for setting "color scheme"
Closed this issue · 2 comments
My app has the ability for the user to pick dark mode, light mode or system. It would be great if I could force the color mode of the toast so that when, for example, the user's phone is in dark mode but they have selected light mode in the app, then the toast could be shown in light mode, not what the users phone color scheme is set to.
I realize this might not be possible based on the libraries used, but just thought I'd throw it out there.
Thanks for the great library!
Hey @gorbypark - you can do that without any changes needed to this library. You'll want to use Appearance
from react-native
would look something like this:
// whatever code you have to set light, dark, system
// example:
// simplified
Appearance.setColorScheme(appColorMode !== 'system' ? appColorMode : null)
So if your appColorMode
is not system, you can directly set either light or dark, null will reset it back to use the system color scheme 👍
If you’re using expo all you need to do is install their system ui library and set the appearance in your app config