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