hide method

void hide()

Hides the topmost loading dialog.

The method triggers the hide animation of the dialog, which will remove the overlay after the animation completes.

Implementation

void hide() {
  if (_overlays.isNotEmpty) {
    if (_overlays.last.animationKey.currentState == null) {
      _removeOverlay();
    } else {
      _overlays.last.animationKey.currentState!.hide();
    }
  }
  notifyListeners();
}