onFieldFocusChanged<TValue> method

  1. @internal
void onFieldFocusChanged<TValue>(
  1. TKey loKey,
  2. bool isFocused
)

Implementation

@internal
void onFieldFocusChanged<TValue>(TKey loKey, bool isFocused) {
  final field = fields.get<TValue>(loKey);

  if (isFocused) {
    field.touched = true;
    notifyListeners();
  } else if (field.status.isPure) {
    // Validate pure fields when unfocused
    final value = valueOf<TValue>(loKey);
    onFieldValueChanged<TValue>(loKey, value);
  }
}