show method

Future show()

Implementation

Future show() => showDialog(
        context: this.context,
        barrierDismissible: dismissOnTouchOutside,
        builder: (BuildContext context) {
          if (autoHide != null) {
            Future.delayed(autoHide!).then((value) => dismiss());
          }
          switch (animType) {
            case AnimType.SCALE:
              return ScaleFade(
                scale: 0.1,
                fade: true,
                curve: Curves.fastLinearToSlowEaseIn,
                child: _buildDialog,
                duration: animDuration,
              );
              break;
            case AnimType.LEFT_SLIDE:
              return FadeIn(
                  from: SlideFrom.LEFT,
                  child: _buildDialog,
                  duration: animDuration);
              break;
            case AnimType.RIGHT_SLIDE:
              return FadeIn(
                  from: SlideFrom.RIGHT,
                  child: _buildDialog,
                  duration: animDuration);
              break;
            case AnimType.BOTTOM_SLIDE:
              return FadeIn(
                  from: SlideFrom.BOTTOM,
                  child: _buildDialog,
                  duration: animDuration);
              break;
            case AnimType.TOP_SLIDE:
              return FadeIn(
                  from: SlideFrom.TOP,
                  child: _buildDialog,
                  duration: animDuration);
              break;
            case AnimType.FADE:
              return FadeIn(child: _buildDialog, duration: animDuration);
              break;
            case AnimType.SMOOTH_SCALE:
              return ScaleFade(
                  scale: 0.8,
                  fade: true,
                  curve: Curves.easeOutCirc,
                  child: _buildDialog,
                  duration: animDuration);
              break;
            default:
              return _buildDialog;
          }
        }).then((_) {
      isDismissedBySystem = true;
      if (onDismissCallback != null) onDismissCallback!();
    });