📜  颤动激活或停用深色主题 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:01.488000             🧑  作者: Mango

代码示例1
//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,
)