removeScopedWillPopCallback method
Remove one of the callbacks run by willPop.
See also:
- Form, which provides an onWillPopcallback that uses this mechanism.
- addScopedWillPopCallback, which adds callback to the list checked by willPop.
Implementation
void removeScopedWillPopCallback(WillPopCallback callback) {
  assert(_scopeKey.currentState != null, 'Tried to remove a willPop callback from a route that is not currently in the tree.');
  _willPopCallbacks.remove(callback);
}