onFocusReceived method
override
Notifies the client that the platform moved focus back to this input.
This is necessary to support autofill on some browsers (e.g. iOS Safari) that blur the text field and refocus it before autofilling.
Returns true if the client acquired focus, false otherwise.
Implementation
@override
bool onFocusReceived() {
if (mounted && !_hasFocus && widget.focusNode.canRequestFocus) {
widget.focusNode.requestFocus();
return true;
}
return false;
}