onRemoveListener method

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

A life-cycle for whenever a listener is removed from the provider.

See also:

Implementation

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