我已经将statusbar颜色设置为透明。但是Appbar仍然不一样。 // on main method
if (Platform.isAndroid) {
SystemUiOverlayStyle systemUiOverlayStyle =
SystemUiOverlayStyle(statusBarColor: Colors.transparent);
SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
}
// on a widget build method
Scaffold
我正在尝试使底部导航栏为白色,带有黑色图标(相对于默认的黑色背景和白色按钮)。 我在main.dart中使用了这段代码,其中我使用了SystemChrome方法来设置背景色和图标颜色。当我第一次打开这个应用程序时,这看起来很棒。 class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
SystemChrome.setPreferredOrientatio
我将导航栏和搜索栏设置为自定义UIColor (在我的代码中称为categoryColor )。当我这样做的时候,我仍然看到导航栏和搜索栏之间的灰色上线。我已经将searchBar边框的颜色设置为与其他颜色相同,但这条灰色线仍然存在。有人知道怎么摆脱它吗?这是我的代码:
override func viewWillAppear(_ animated: Bool) {
//defining the color that will be used for all the items
let categoryColor = UIColor(hexString: selectCate
我是新来的flutter。
我只想在闪屏中隐藏状态栏。我也为状态栏设置了特定的颜色。下面是我为状态栏指定颜色的代码。
我在main方法中使用了下面的代码来给出特定的颜色。
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle(
statusBarIconBrightness: Brightness.dark,
statusBarColor: colorStyle.statusBar, // status bar color
现在我只想在闪屏中隐藏状态栏。
当我使用
SystemChrome.se