onAddListener method
A life-cycle for whenever a new listener is added to the provider.
See also:
- onRemoveListener, for when a listener is removed
Implementation
@override
void onAddListener(void Function() cb) {
_onAddListeners ??= [];
_onAddListeners!.add(cb);
}