【发布时间】:2020-09-08 19:21:19
【问题描述】:
我对 Flutter 上的 DateTimeFormField 有一个大问题。我无法更改提示、标签或默认文本样式颜色更改。
我已经尝试过了;
var textStyle = TextStyle(
color: Hexcolor("#D8D8D8"),
fontSize: ScreenUtil().setSp(42.0),
);
return DateTimeFormField(
mode: widget.mode,
label: widget.label,
decoration: InputDecoration(
filled: true,
fillColor: Hexcolor("#F9F9F9"),
contentPadding: EdgeInsets.only(
left: 20.0,
top: 20.0,
bottom: 5.0,
),
prefixStyle: textStyle,
hintStyle: textStyle,
labelStyle: textStyle,
border: defaultBorder,
focusedBorder: focusedBorder,
enabledBorder: enabledBorder,
),
onDateSelected: widget.onDateSelected,
//controller: widget.controller,
//maxLines: maxLines,
//obscureText: obscureText,
);
但是颜色看起来像这个图像:
如何更改字段默认颜色?
【问题讨论】:
标签: flutter