addPropertyChangedListener method Null safety

void addPropertyChangedListener(
  1. CalendarValueChangedCallback listener
)

Calls the listener every time the controller's property changed.

Listeners can be removed with removePropertyChangedListener.

Implementation

void addPropertyChangedListener(CalendarValueChangedCallback listener) {
  _listeners ??= <CalendarValueChangedCallback>[];
  _listeners!.add(listener);
}