show method

Future<void> show({
  1. bool animated = true,
})

Shows the popover.

If already shown, calling this method brings the popover to the top.

This method should typically not be called while the widget tree is being rebuilt.

Implementation

Future<void> show({bool animated = true}) async {
  if (_animation.isForwardOrCompleted) {
    return;
  }

  _overlay.show();
  if (animated) {
    await _animation.forward();
  } else {
    _animation.value = 1;
  }
  notifyListeners();
}