With Material 3, colorSchemeSeed can be used to set the color for the entire app. This works for colors like Red, Blue, and Green. If left as default the color will be purple. When trying to use black color as a seed, the color defaults to purple. What would be the best way to have the Material 3 app, but have the color of the app Theme be plain black and white (in light and dark mode)?
Easiest way would be to setup your ThemeData colorScheme manually. This is for light theme, you can just set Brightness.dark and swap around black and white for dark theme
ThemeData(
useMaterial3: true,
colorScheme: ColorScheme(
brightness: Brightness.light,
primary: Colors.black,
onPrimary: Colors.white,
secondary: Colors.white,
onSecondary: Colors.black,
error: Colors.red,
onError: Colors.white,
background: Colors.white,
onBackground: Colors.black,
surface: Colors.white,
onSurface: Colors.black,
),
textTheme: textTheme,
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With