dismissLayer static method

Future<void> dismissLayer(
  1. OverlayShower? shower, {
  2. String? key,
})

Implementation

static Future<void> dismissLayer(OverlayShower? shower, {String? key}) async {
  // remove & dismiss from top to bottom
  if (shower != null) {
    remove(shower);
    await _dismiss(shower);
  }
  if (key != null && (shower = _map()[key]) != null) {
    remove(shower);
    await _dismiss(shower);
  }
}