flutter 输入控件的使用:
TextEditingController typeController
= TextEditingController()
TextField(
controller
: typeController
,
decoration
: InputDecoration(
contentPadding
: EdgeInsets
.all(10.0),
labelText
: '用户名',
helperText
: '请输入用户名'
prefixIcon
: Icon(Icons
.person
)
)
),
RaisedButton(onPressed
: fn(), child
: Text('获取输入值'))
typeController
.text
.toString()
详细使用教程
转载请注明原文地址:https://ipadbbs.8miu.com/read-59720.html