修改方法
只有把
enabledBorder: new UnderlineInputBorder
focusedBorder: new UnderlineInputBorder
设置为 borderSide: BorderSide.none, 即可,修改焦点时颜色都可以在这里定义
Container(
padding: EdgeInsets.only(left: 18.0, right: 18.0),
height: 150.0,
child: new TextField(
controller: _mnemonicController,
keyboardType: TextInputType.text,
maxLength: 150,
onChanged: (value) {
setState(() {});
},
autofocus: false,
decoration: InputDecoration(
enabledBorder: new UnderlineInputBorder( //没有焦点时
borderSide: BorderSide.none,
),
focusedBorder: new UnderlineInputBorder( //有焦点时
borderSide: BorderSide.none,
),
contentPadding:
EdgeInsets.symmetric(vertical: 10, horizontal: 10),
hintText:
S.of(context).string_wallet_enter_receive_amount,
counterText: '',
),
),
),