focus method

  1. @override
void focus()
override

Sets focus on a ReactiveFormField widget without the interaction of the user.

Example:

final formControl = form.formControl('name');

// UI text field get focus and the device keyboard pop up
formControl.focus();

Implementation

@override
void focus() {
  if (!hasFocus) {
    _updateFocusState(true);
  }
}