insert method
create animation and overlayEntry an insert to overlayState
Implementation
Future<void> insert() async {
if (_isDisposed) return;
completer = Completer<void>();
_overlayEntry = _createModal(
(transition.routeTransition ?? RouteTransition.slide_down).build(
child: _content(remove),
animation: _createAnimation(),
secondaryAnimation: _createSecondaryAnimation(),
),
);
//show
_overlayState.insert(_overlayEntry!);
await _animationController.forward();
if (_isDisposed) return;
if (duration is Duration && duration != Duration.zero) {
timer = Timer(duration!, remove);
}
await completer?.future;
}