add method

void add(
  1. VoidCallback listener
)

Adds a disposer callback to the current notification data.

Implementation

void add(VoidCallback listener) {
  if (_notifyData?.unmountDisposers != null) {
    _notifyData!.unmountDisposers!.add(listener);
  } else {
    _notifyData?.disposers.add(listener);
  }
}