closeModal method

  1. @override
void closeModal({
  1. bool disconnectSession = false,
})
override

Closes the modal.

Implementation

@override
void closeModal({bool disconnectSession = false}) async {
  _disconnectOnClose = disconnectSession;
  // If we aren't open, then we can't and shouldn't close
  _close();
  if (_context != null) {
    final canPop = Navigator.of(_context!, rootNavigator: true).canPop();
    if (canPop) {
      Navigator.of(_context!, rootNavigator: true).pop();
    }
  }
  _notify();
}