show static method
void
show(
- BuildContext context, {
- BetterPopupPosition position = BetterPopupPosition.bottom,
- Color? backgroundColor,
- double? width,
- double? height,
- Widget? child,
- BorderRadiusGeometry? borderRadius,
- bool isShowCloseIcon = false,
- double? closeIconSize,
- Color? closeIconColor,
- bool isDismissible = true,
- Widget? closeIcon,
- EdgeInsets? padding,
- List<
BoxShadow> ? boxShadow, - VoidCallback? onClose,
- bool? enableDrag,
Implementation
static void show(
BuildContext context, {
/// 弹出层的位置
BetterPopupPosition position = BetterPopupPosition.bottom,
/// 弹出层的背景颜色
Color? backgroundColor,
/// 弹出层的宽度
double? width,
/// 弹出层的高度
double? height,
/// 弹出层的子组件
Widget? child,
/// 弹出层的圆角半径
BorderRadiusGeometry? borderRadius,
/// 是否显示关闭图标
bool isShowCloseIcon = false,
/// 关闭图标的大小
double? closeIconSize,
/// 关闭图标的颜色
Color? closeIconColor,
bool isDismissible = true,
Widget? closeIcon,
/// 弹出层的内边距
EdgeInsets? padding,
/// 弹出层的阴影
final List<BoxShadow>? boxShadow,
/// 关闭回调
VoidCallback? onClose,
/// 是否启用拖拽,仅支持底部弹出
bool? enableDrag,
}) {
if (position == BetterPopupPosition.bottom) {
_showBottomPopup(
context,
backgroundColor: backgroundColor,
height: height,
width: width,
child: child,
borderRadius: borderRadius,
isShowCloseIcon: isShowCloseIcon,
closeIconSize: closeIconSize,
closeIconColor: closeIconColor,
isDismissible: isDismissible,
closeIcon: closeIcon,
padding: padding,
boxShadow: boxShadow,
onClose: onClose,
enableDrag: enableDrag,
);
return;
}
_showPopup(
context,
position: position,
backgroundColor: backgroundColor,
height: height,
width: width,
child: child,
borderRadius: borderRadius,
isShowCloseIcon: isShowCloseIcon,
closeIconSize: closeIconSize,
closeIconColor: closeIconColor,
isDismissible: isDismissible,
closeIcon: closeIcon,
padding: padding,
boxShadow: boxShadow,
onClose: onClose,
);
}