hideAll method

void hideAll()

Hides all active dialogs in the stack.

Clears the dialogs stack and closes all associated SnackBars.

Throws a CustomException if an error occurs during the process.

Implementation

void hideAll() {
  try {
    for (_DialogEntry element in _dialogsStack) {
      element.controller?.close();
    }
    _dialogsStack.clear();
  } on CustomException {
    rethrow;
  } catch (e, s) {
    throw CustomException(
      message: 'حصل خطأ في احدى الميزات, رمز الخطأ [SMK-null]',
      hiddenMessage: '{\ne: $e\ns:$s\n}',
    );
  }
}