Answers for "flutter activate or deactivate dark theme"

0

flutter activate or deactivate dark theme

//Use either the light or dark theme based on what
//the user has selected in the system settings.
ThemeMode.system

// Always use the light mode regardless of system preference.
ThemeMode.light

//Always use the dark mode (if available) regardless of system preference.
ThemeMode.dark


MaterialApp(
   themeMode: ThemeMode.light,
)
Posted by: Guest on July-05-2021

Browse Popular Code Answers by Language