showPopupWindow<T> function

PopupWindow showPopupWindow<T>(
  1. BuildContext context, {
  2. Widget childFun(
    1. PopupWindow popup
    )?,
  3. Size? childSize,
  4. PopupGravity? gravity,
  5. Curve? curve,
  6. bool? customAnimation,
  7. bool? customPop,
  8. bool? customPage,
  9. Color? bgColor,
  10. RenderBox? targetRenderBox,
  11. bool? underStatusBar,
  12. bool? underAppBar,
  13. bool? clickOutDismiss,
  14. bool? clickBackDismiss,
  15. double? offsetX,
  16. double? offsetY,
  17. Duration? duration,
  18. bool? needSafeDisplay,
  19. bool? useCustomWH,
  20. double? customWidth,
  21. double? customHeight,
  22. dynamic onShowStart(
    1. PopupWindow popup
    )?,
  23. dynamic onShowFinish(
    1. PopupWindow popup
    )?,
  24. dynamic onDismissStart(
    1. PopupWindow popup
    )?,
  25. dynamic onDismissFinish(
    1. PopupWindow popup
    )?,
  26. dynamic onClickOut(
    1. PopupWindow popup
    )?,
  27. dynamic onClickBack(
    1. PopupWindow popup
    )?,
})

create_user: zhengzaihong email:1096877329@qq.com create_date: 2021-12-11 create_time: 18:08 describe: 类似 android 的popwindow 控件

Implementation

PopupWindow showPopupWindow<T>(
  BuildContext context, {
  Widget Function(PopupWindow popup)? childFun,
  Size? childSize,
  PopupGravity? gravity,
  Curve? curve,
  bool? customAnimation,
  bool? customPop,
  bool? customPage,
  Color? bgColor,
  RenderBox? targetRenderBox,
  bool? underStatusBar,
  bool? underAppBar,
  bool? clickOutDismiss,
  bool? clickBackDismiss,
  double? offsetX,
  double? offsetY,
  Duration? duration,
  bool? needSafeDisplay,
  bool? useCustomWH,
  double? customWidth,
  double? customHeight,
  Function(PopupWindow popup)? onShowStart,
  Function(PopupWindow popup)? onShowFinish,
  Function(PopupWindow popup)? onDismissStart,
  Function(PopupWindow popup)? onDismissFinish,
  Function(PopupWindow popup)? onClickOut,
  Function(PopupWindow popup)? onClickBack,
}) {
  var popup = PopupWindow(
    gravity: gravity,
    curve: curve,
    customAnimation: customAnimation,
    customPop: customPop,
    customPage: customPage,
    bgColor: bgColor,
    childFun: childFun,
    childSize: childSize,
    targetRenderBox: targetRenderBox,
    underStatusBar: underStatusBar,
    underAppBar: underAppBar,
    clickOutDismiss: clickOutDismiss,
    clickBackDismiss: clickBackDismiss,
    offsetX: offsetX,
    offsetY: offsetY,
    duration: duration,
    needSafeDisplay: needSafeDisplay,
    useCustomWH: useCustomWH,
    onShowStart: onShowStart,
    onShowFinish: onShowFinish,
    onDismissStart: onDismissStart,
    onDismissFinish: onDismissFinish,
    onClickOut: onClickOut,
    onClickBack: onClickBack,
  );
  popup.show(context);
  return popup;
}