changeNotifier property

ChangeNotifier get changeNotifier

Returns the ChangeNotifier associated with this control.

Throws if neither control nor formGroup+name were provided.

Implementation

ChangeNotifier get changeNotifier {
  if (_control != null) return _control!;
  if (formGroup != null && name != null) {
    return formGroup!.control(name!);
  }
  throw Exception(
    'ControlValueAcessor: control or formGroup and name must be provided',
  );
}