ElPopup constructor

const ElPopup({
  1. Key? key,
  2. ValueChanged<bool?>? onChanged,
  3. dynamic show,
  4. Duration? duration,
  5. Object? overlayId,
  6. ElOverlayState? overlayState,
  7. bool rootOverlay = false,
  8. bool keepAlive = false,
  9. bool preventBack = false,
  10. VoidCallback? onInsert,
  11. VoidCallback? onRemove,
  12. required Widget transitionBuilder(
    1. BuildContext context,
    2. Widget child
    ),
  13. required Widget overlayBuilder(
    1. BuildContext context
    ),
  14. required Widget builder(
    1. BuildContext context,
    2. ElPopupState<ElPopup> state
    ),
})

Implementation

const ElPopup({
  super.key,
  super.onChanged,
  this.show,
  this.duration,
  this.overlayId,
  this.overlayState,
  this.rootOverlay = false,
  this.keepAlive = false,
  this.preventBack = false,
  this.onInsert,
  this.onRemove,
  required this.transitionBuilder,
  required this.overlayBuilder,
  required this.builder,
}) : assert(
       show == null || show is bool || show is ValueNotifier<bool>,
       '弹出层 show 参数必须为 bool 类型',
     ),
     super(show);