yas*_*eri 10 radix dart flutter
尝试从TextFormFeild. 我已经多次使用这个小部件,但我没有在任何时候收到这个错误。有人知道具体是什么意思吗?
这将是一个很大的帮助。以下只是整个(1084 行)代码的一部分,我认为错误可能是:(我还初始化了controller:'bowlerIndexController = new TextEditingController(text: "");':/)...
void changeBowler(BuildContext context) {
showDialog(
context: context,
builder: (context) {
return new SimpleDialog(
title: new Text("Who is bowling next?",
style:
new TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold)),
children: <Widget>[
new Column(
children: List<Widget>.generate(teamBowling.length, (index) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: new Row(
children: <Widget>[
new Padding(
padding: new EdgeInsets.all(2.0),
child: new Text(
(index + 1).toString(),
style: new TextStyle(fontSize: 15.0),
),
),
new Text(teamBowling[index].player["Name"],
style: new TextStyle(
fontSize: 18.0, fontWeight: FontWeight.bold))
],
),
);
}),
),
new TextFormField(
keyboardType: new TextInputType.numberWithOptions(
signed: false, decimal: false),
decoration: new InputDecoration(
hintText: "Enter the bowler's corresponding number"),
controller: bowlerIndexController,
),
new RaisedButton(
child: new Text(
"DONE",
style: new TextStyle(color: Colors.black),
),
onPressed: () {
int a =
int.parse(bowlerIndexController.text.toString()) - 2;
if (a >= 0 && a < teamBowling.length) {
bowlerIndex = int.parse(bowlerIndexController.toString());
Navigator.pop(context);
}
})
],
);
});
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15410 次 |
| 最近记录: |