focused property

bool get focused

Whether this field currently has input focus.

Implementation

bool get focused => _focused;
set focused (bool val)

Implementation

set focused(bool val) {
  if (_focused && !val) {
    if (touched) {
      validate();
    }
  }
  _focused = val;
  if (val) {
    touched = true;
  }
}