我试图根据系统主题模式更改容器的颜色。是否有一种使用条件if来更改它的方法?
以下是代码:
Container(
color: //this is what I'm trying to change based on the theme,
padding: EdgeInsets.only(right: 10, left: 10, top: 7, bottom: 25),
child: Row(
children: [
Flexible(
我想在我的应用程序中给每个CircularProgressIndicator一个颜色,但是在MaterialApp小部件中是哪个属性负责的:
MaterialApp(
theme: ThemeData(
// what is the attribute for this widget.
)
)
我同时使用了accentColor和colorScheme.secondary,但仍然没有改变。