copyWith method

PopoverConfiguration<T> copyWith({
  1. ValueGetter<Anchor?>? anchor,
  2. ValueGetter<AlignmentGeometry>? alignment,
  3. ValueGetter<WidgetBuilder>? builder,
  4. ValueGetter<Offset?>? position,
  5. ValueGetter<AlignmentGeometry?>? anchorAlignment,
  6. ValueGetter<PopoverConstraint>? widthConstraint,
  7. ValueGetter<PopoverConstraint>? heightConstraint,
  8. ValueGetter<Key?>? key,
  9. ValueGetter<bool>? rootOverlay,
  10. ValueGetter<bool>? modal,
  11. ValueGetter<bool>? barrierDismissable,
  12. ValueGetter<Clip>? clipBehavior,
  13. ValueGetter<Object?>? regionGroupId,
  14. ValueGetter<Offset?>? offset,
  15. ValueGetter<AlignmentGeometry?>? transitionAlignment,
  16. ValueGetter<EdgeInsetsGeometry?>? margin,
  17. ValueGetter<bool>? follow,
  18. ValueGetter<bool>? consumeOutsideTaps,
  19. ValueGetter<ValueChanged<PopoverOverlayWidgetState>?>? onTickFollow,
  20. ValueGetter<bool>? allowInvertHorizontal,
  21. ValueGetter<bool>? allowInvertVertical,
  22. ValueGetter<bool>? dismissBackdropFocus,
  23. ValueGetter<Duration?>? showDuration,
  24. ValueGetter<Duration?>? dismissDuration,
  25. ValueGetter<OverlayBarrier?>? overlayBarrier,
  26. ValueGetter<OverlayHandler?>? handler,
})

Returns a copy of this configuration with the given fields replaced.

Implementation

PopoverConfiguration<T> copyWith({
  ValueGetter<Anchor?>? anchor,
  ValueGetter<AlignmentGeometry>? alignment,
  ValueGetter<WidgetBuilder>? builder,
  ValueGetter<Offset?>? position,
  ValueGetter<AlignmentGeometry?>? anchorAlignment,
  ValueGetter<PopoverConstraint>? widthConstraint,
  ValueGetter<PopoverConstraint>? heightConstraint,
  ValueGetter<Key?>? key,
  ValueGetter<bool>? rootOverlay,
  ValueGetter<bool>? modal,
  ValueGetter<bool>? barrierDismissable,
  ValueGetter<Clip>? clipBehavior,
  ValueGetter<Object?>? regionGroupId,
  ValueGetter<Offset?>? offset,
  ValueGetter<AlignmentGeometry?>? transitionAlignment,
  ValueGetter<EdgeInsetsGeometry?>? margin,
  ValueGetter<bool>? follow,
  ValueGetter<bool>? consumeOutsideTaps,
  ValueGetter<ValueChanged<PopoverOverlayWidgetState>?>? onTickFollow,
  ValueGetter<bool>? allowInvertHorizontal,
  ValueGetter<bool>? allowInvertVertical,
  ValueGetter<bool>? dismissBackdropFocus,
  ValueGetter<Duration?>? showDuration,
  ValueGetter<Duration?>? dismissDuration,
  ValueGetter<OverlayBarrier?>? overlayBarrier,
  ValueGetter<OverlayHandler?>? handler,
}) {
  return PopoverConfiguration<T>(
    anchor: anchor == null ? this.anchor : anchor(),
    alignment: alignment == null ? this.alignment : alignment(),
    builder: builder == null ? this.builder : builder(),
    position: position == null ? this.position : position(),
    anchorAlignment:
        anchorAlignment == null ? this.anchorAlignment : anchorAlignment(),
    widthConstraint:
        widthConstraint == null ? this.widthConstraint : widthConstraint(),
    heightConstraint:
        heightConstraint == null ? this.heightConstraint : heightConstraint(),
    key: key == null ? this.key : key(),
    rootOverlay: rootOverlay == null ? this.rootOverlay : rootOverlay(),
    modal: modal == null ? this.modal : modal(),
    barrierDismissable: barrierDismissable == null
        ? this.barrierDismissable
        : barrierDismissable(),
    clipBehavior: clipBehavior == null ? this.clipBehavior : clipBehavior(),
    regionGroupId:
        regionGroupId == null ? this.regionGroupId : regionGroupId(),
    offset: offset == null ? this.offset : offset(),
    transitionAlignment: transitionAlignment == null
        ? this.transitionAlignment
        : transitionAlignment(),
    margin: margin == null ? this.margin : margin(),
    follow: follow == null ? this.follow : follow(),
    consumeOutsideTaps: consumeOutsideTaps == null
        ? this.consumeOutsideTaps
        : consumeOutsideTaps(),
    onTickFollow: onTickFollow == null ? this.onTickFollow : onTickFollow(),
    allowInvertHorizontal: allowInvertHorizontal == null
        ? this.allowInvertHorizontal
        : allowInvertHorizontal(),
    allowInvertVertical: allowInvertVertical == null
        ? this.allowInvertVertical
        : allowInvertVertical(),
    dismissBackdropFocus: dismissBackdropFocus == null
        ? this.dismissBackdropFocus
        : dismissBackdropFocus(),
    showDuration: showDuration == null ? this.showDuration : showDuration(),
    dismissDuration:
        dismissDuration == null ? this.dismissDuration : dismissDuration(),
    overlayBarrier:
        overlayBarrier == null ? this.overlayBarrier : overlayBarrier(),
    handler: handler == null ? this.handler : handler(),
  );
}