I try build a form using Flutter, I have my own StatefulWidget that return a Form with 2 Input (I try with TextField too) and a DropdownButton.
When I executed the second Input show this error: 'Missing Focus scope.'
The code:
import 'package:flutter/material.dart';
class ContactFormView extends StatefulWidget {
@override
CreateFormViewState createState() => new CreateFormViewState();
}
class CreateFormViewState extends State<ContactFormView> {
GlobalKey<FormState> _formKey = new GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
return new Scaffold(
body: new Form(
key: _formKey,
child: new Column(
children: <Widget>[
new Input(
labelText: 'First Name',
onChanged: (InputValue value) {
// Logic here
}
),
new Input(
labelText: 'Last Name',
onChanged: (InputValue value) {
// Logic here
}
),
new RaisedButton(
child: new Text('SUBMIT'),
onPressed: () {
// Logic here
},
)
]
)
)
);
}
}
Finally, the problem was fixed on next updates. Right now, you can use this widget without problems. https://docs.flutter.io/flutter/widgets/Form-class.html