show method

Future show(
  1. {@required BuildContext context,
  2. @required Widget child,
  3. double height,
  4. EdgeInsetsGeometry padding,
  5. bool barrierDismissible = false}
)

Implementation

static Future show({
  @required BuildContext context,
  @required Widget child,
  double height,
  EdgeInsetsGeometry padding,
  bool barrierDismissible = false,
}) {
  // 保存当前上下文句柄
  _contexts.add(context);

  return _showPopup(
    context: context,
    builder: (BuildContext context) {
      return _Popup(
        child: child,
        height: height,
        padding: padding,
        barrierDismissible: barrierDismissible,
      );
    },
  );
}