changeFocus method

void changeFocus({
  1. bool? hasFocus,
})

Implementation

void changeFocus({bool? hasFocus}) {
  if (hasFocus ?? this.hasFocus) {
    unfocus();
  } else {
    requestFocus();
  }
}