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