【发布时间】:2019-12-16 16:25:54
【问题描述】:
我们正在使用flutter内置的步进器,我们希望将输入文本颜色更改为白色,默认为黑色:代码如下:
List<Step> steps = [
new Step(
title: const Text('First Name', style: TextStyle( color: Colors.white, fontWeight: FontWeight.bold, fontSize: 19.0 )),
isActive: true,
state: StepState.indexed,
content: new TextFormField(
focusNode: _focusNode,
keyboardType: TextInputType.text,
autocorrect: false,
onSaved: (String value) {
data.firstname = value;
},
maxLines: 1,
validator: (value) {
if (value.isEmpty || value.length < 1) {
return 'Please enter first name';
}
},
decoration: new InputDecoration(
labelText: 'Enter your first name',
icon: const Icon(Icons.person, color: Colors.white),
labelStyle:
new TextStyle(decorationStyle: TextDecorationStyle.solid,color: Colors.white, fontSize: 16.0))
),
),
【问题讨论】: