我希望我的应用栏是真正的白色,仍然使用材料 3 设计。 我尝试过使用
backGroundColor: Colors.white
在应用程序的 ThemeData 中或直接在小部件中。一切都没有改变。
这是我的代码:
static ThemeData lightTheme = ThemeData(
useMaterial3: true,
brightness: Brightness.light,
primaryColor: Colors.white,
appBarTheme: const AppBarTheme(
backgroundColor: Colors.white,
),
);
}
return Scaffold(
appBar: AppBar(
elevation: 20,
backgroundColor: Colors.white,
title: Widget()
)
)
我不想要那种灰色。我只想要白色。
使用
Color.fromRGBO(255,255,255,255)
。应该有效