updateOverlay method

void updateOverlay(
  1. String key,
  2. OverlayEntry overlay
)

Implementation

void updateOverlay(String key, OverlayEntry overlay) {
  overlays[key]?.remove();
  overlays[key] = overlay;
}