#
ProviderBefore using with styles in your application, you need to wrap your app with ThemeProvider
first.
ThemeProvider only takes
theme
anddefault Theme
props.
If you want to load different color palettes, you need to give these palettes in
colors
. The keys you use here are important. You will use these keys when changing the theme.
The default value of
defaultTheme
islight
. You can give this field one of your color palettes under colors.
#
System ThemeYou can also use the value system
If you pass it to system
it will use the device's theme by default.