show method

void show({
  1. required Duration duration,
  2. VoidCallback? onDismiss,
})

Implementation

void show({required Duration duration, VoidCallback? onDismiss}) async {
  _isVisible = true;
  overlayState.insert(overlayEntry);
  Future.delayed(duration, () {
    _dismiss();
    onDismiss?.call();
  });
}