focus method

  1. @override
void focus()
override

Implementation

@override
void focus() {
  if (ownerDocument.focusedElement != this) {
    // Blur current focused element.
    ownerDocument.focusedElement?.blur();
    // Focus kraken widget to get focus from other widgets.
    WidgetDelegate? widgetDelegate = ownerDocument.widgetDelegate;
    widgetDelegate?.requestFocus();
    ownerDocument.focusedElement = this;

    focusTextFormControl();
  }
}