floatingActionButton
should be wrapped inside the scaffold not container!
You could change it this way:
class _NewTaskState extends State<NewTask> {
@override
Widget build(BuildContext context) {
return new Scaffold(
body: new Container(
child: new Column(
children: <Widget>[
TaskDesc.length == 0 ? dynamicTextField : result,
Task.length == 0 ? submitButton : new Container(),
]
),
),
floatingActionButton: FloatingActionButton(
onPressed: addDynamic,
child:new Icon(Icons.add)
),
);
}
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…