onAddListener method

  1. @override
void onAddListener(
  1. void cb()
)
override

A life-cycle for whenever a new listener is added to the provider.

See also:

Implementation

@override
void onAddListener(void Function() cb) {
  _onAddListeners ??= [];
  _onAddListeners!.add(cb);
}