onModalOpened method

void onModalOpened(
  1. Modal modal
)

Should be triggered when modal is opened.

Implementation

void onModalOpened(Modal modal) {
  if (_stack.isNotEmpty) {
    _stack.last.hidden = true;
  }
  _stack.add(modal);
}