【发布时间】:2019-10-30 16:06:11
【问题描述】:
我需要更改标签和边框的默认颜色以在焦点上使用原色,并且我已经尝试过 InputDecorationTheme,但它不适用于标签。我意识到 TextField 使用强调色。
The screen; 和主题:
final ThemeData darkTheme = ThemeData(
primaryColor: Colors.blueAccent[400],
accentColor: Colors.pinkAccent[400],
brightness: Brightness.dark,
backgroundColor: Colors.grey[900],
inputDecorationTheme: InputDecorationTheme(
fillColor: Colors.white.withOpacity(0.1),
filled: true,
),
);
谢谢。
【问题讨论】:
标签: flutter dart flutter-theme