在我的 flutter 中,我创建了一个 TextFormField,但它的键盘颜色在 iOS 中是黑色的,我想知道如何将其更改为白色。
flutter语言版本:>=2.2.2
这是我关于 TextFormField 的代码:
TextFormField(
style: TextStyle(
fontSize: 14,
color: Colors.black),
autofocus: false,
initialValue: 'initial value',
maxLines: 1,
// onSaved: (String value) => _person = value,
// obscureText: _isObscure,
validator: (String value) {
if (value.isEmpty) {
return 'nononono';
}
return null;
},
decoration: InputDecoration(
hintText: 'please make sure',
contentPadding: EdgeInsets.fromLTRB(15, 5, 15, 5),
hintStyle: TextStyle(
color: Colors.grey,
fontSize: 12,
),
hasFloatingPlaceholder: false,
// contentPadding: contentPadding,
border: InputBorder.none,
),
),
当我单击这个 TextFormField 时
我得到什么:
黑色键盘
我想要的是:
白色键盘