dismiss method

void dismiss(
  1. Completer completer
)

Implementation

void dismiss(Completer completer) {
  _animationDuration = const Duration(milliseconds: 300);
  if (mounted) {
    setState(() {
      _opacity = 0.0;
    });
  }
  Future.delayed(_animationDuration!, () {
    completer.complete();
  });
}