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