Use case
I want to implement feature that when form validated fail scroll to that FormField.
currently I implement with copy form.dart file and change _field to field to make it public
and do some validation like document said
and scroll to specify field with
formKey.currentState.validate();
Scrollable.ensureVisible(formKey.currentState.fields.first.context,
duration: Duration(milliseconds: 500));
Proposal
form.dart
...
class FormState extends State<Form> {
int _generation = 0;
final Set<FormFieldState<dynamic>> fields = <FormFieldState<dynamic>>{};
...
What do you think ?
Thank you.
Use case
I want to implement feature that when form validated fail scroll to that FormField.
currently I implement with copy
form.dartfile and change_fieldtofieldto make it publicand do some validation like document said
and scroll to specify field with
Proposal
form.dart
What do you think ?
Thank you.