ExtendedBuildContext extension
- on
Methods
-
clearFocus(
) → void -
Available on BuildContext, provided by the ExtendedBuildContext extension
Clear current context focus. This is the cleanest, official way. -
validateForm(
{VoidCallback? onValidated, bool scrollToFirstInvalid = false}) → bool -
Available on BuildContext, provided by the ExtendedBuildContext extension
Validate the enclosing Form, and save it if valid. Returns whether the form is valid, like FormState.validate.onValidatedis called if the form is valid, after it has been saved. IfscrollToFirstInvalidis true and validation fails, scrolls to the first invalid field.