我正试图设置TextFormField
的边框。我正在使用OutlineInputBorder
。它默认采用几乎黑色的颜色,焦点采用原色。我试图改变BorderSide
的颜色,但它没有用。
我还尝试了UnderlineInputBorder
中new TextFormField(
decoration: new InputDecoration(
labelText: "Email",
contentPadding: new EdgeInsets.all(12.0),
filled: true,
border: new OutlineInputBorder(
borderSide: new BorderSide(width: 2.0, color: Colors.white),
)
),
),
提到的变通办法,但没有任何变化。
always @ (posedge clk) begin
if (x) begin
count <= count + 1'b1;
end
end
always @ (posedge clk) begin
if (y) begin
count <= count - 2'b10;
end
end
always @ (negedge clk) begin
if (x) begin
count <= count - 1'b1;
end
end
always @ ( count ) begin
...do something... ;
end
答案 0 :(得分:2)
深挖后,似乎只能由ThemeData配置。所以我只是添加了一个主题小部件。
body: Theme(data: Theme.of(context).copyWith(
primaryColor: Colors.white,
accentColor: Colors.amber
), child: new TextFormField(
decoration: new InputDecoration(
labelText: "Email",
contentPadding: new EdgeInsets.all(12.0),
),
),
Color _getActiveColor(ThemeData themeData) {
if (isFocused) {
switch (themeData.brightness) {
case Brightness.dark:
return themeData.accentColor;
case Brightness.light:
return themeData.primaryColor;
}
}
return themeData.hintColor;
}