Flutter 颤振:关闭暗模式主题
当我在手机上激活黑暗模式的情况下测试我的应用程序时,cupertinoTabBar的变化会产生一个黑暗主题。我怎样才能防止这种情况?我只希望我的应用程序在灯光模式下设置主题。将Flutter 颤振:关闭暗模式主题,flutter,Flutter,当我在手机上激活黑暗模式的情况下测试我的应用程序时,cupertinoTabBar的变化会产生一个黑暗主题。我怎样才能防止这种情况?我只希望我的应用程序在灯光模式下设置主题。将ThemeMode.light设置为顶部应用程序组件(如MaterialApp)上的ThemeMode字段 比如说 MaterialApp( themeMode: ThemeMode.light, ) 此外,颤振有3种模态 //Use either the light or dark theme based on
ThemeMode.light
设置为顶部应用程序组件(如MaterialApp)上的ThemeMode
字段
比如说
MaterialApp(
themeMode: ThemeMode.light,
)
此外,颤振有3种模态
//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)上的
emode.light
设置为emode
字段
比如说
MaterialApp(
themeMode: ThemeMode.light,
)
此外,颤振有3种模态
//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
这里还有一个很好的线索: 我很难改变顶栏的颜色。解决办法是增加
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
这将迫使您的状态栏变为黑色而不是白色。这里还有一个很好的线索: 我很难改变顶栏的颜色。解决办法是增加
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<true/>
这将强制您的状态栏变为黑色而不是白色。您可以共享您的应用程序主题代码吗?您是否尝试将材质应用程序主题设置为轻主题?像这样的
theme:ThemeData.light(),
你能分享你的应用程序主题代码吗?你试过把material应用程序主题设置为light吗?像这样主题:ThemeData.light(),