dismiss method

Future<void> dismiss(
  1. bool animation
)

Implementation

Future<void> dismiss(bool animation) {
  if (isPersistentCallbacks) {
    Completer<void> completer = Completer<void>();
    _ambiguate(SchedulerBinding.instance)!.addPostFrameCallback((_) =>
        completer
            .complete(_animationController.reverse(from: animation ? 1 : 0)));
    return completer.future;
  } else {
    return _animationController.reverse(from: animation ? 1 : 0);
  }
}