addObserverWithCloser method

void addObserverWithCloser(
  1. HasCloser hasCloser,
  2. WidgetsBindingObserver observer, {
  3. void onClose()?,
})

Implementation

void addObserverWithCloser(
    HasCloser hasCloser, WidgetsBindingObserver observer,
    {void Function()? onClose}) {
  addObserver(observer);
  hasCloser.closer
      .addSubClosable(ClosableWidgetsBinding(this, observer, onClose));
}