insert method

Future insert()

create animation and overlayEntry an insert to overlayState

Implementation

Future insert() async {
  _overlayEntry = _createModal(
    (transition.routeTransition ?? RouteTransition.slide_down).build(
      child: _content(remove),
      animation: _createAnimation(),
      secondaryAnimation: _createSecondaryAnimation(),
    ),
  );
  //show
  _overlayState.insert(_overlayEntry!);
  await _animationController.forward();
  //wait, if the duration is null, de content have a responsibility to cause
  completer = Completer();

  if (duration is Duration) {
    timer = Timer(
      duration!,
      remove,
    );
  }

  return completer!.future;
}