addWillCloseListener method

void addWillCloseListener(
  1. WillCloseListener listener
)

Adds a listener that will be called when the session is about to close. The listener should return a FutureOr that completes when the listener is done.

The listener will be called in the order they were added.

Implementation

void addWillCloseListener(WillCloseListener listener) {
  _willCloseListeners.add(listener);
}