copyWith method

BubbleLabelContent copyWith({
  1. Color? bubbleColor,
  2. double? floatingVerticalPadding,
  3. Widget? child,
  4. double? backgroundOverlayLayerOpacity,
  5. bool? shouldActiveOnLongPressOnAllPlatforms,
  6. String? id,
  7. Offset? positionOverride,
  8. bool? shouldIgnorePointer,
  9. void onTapInside(
    1. TapDownDetails event
    )?,
  10. void onTapOutside(
    1. TapDownDetails event
    )?,
})

Returns a copy of this BubbleLabelContent with the given fields replaced by new values. Any parameter that is null will preserve the original value from the current instance.

Implementation

BubbleLabelContent copyWith({
  Color? bubbleColor,
  double? floatingVerticalPadding,
  Widget? child,
  double? backgroundOverlayLayerOpacity,
  bool? shouldActiveOnLongPressOnAllPlatforms,
  String? id,
  Offset? positionOverride,
  bool? shouldIgnorePointer,
  void Function(TapDownDetails event)? onTapInside,
  void Function(TapDownDetails event)? onTapOutside,
}) {
  return BubbleLabelContent._internal(
    id: id ?? this.id,
    bubbleColor: bubbleColor ?? this.bubbleColor,
    verticalPadding: floatingVerticalPadding ?? this.floatingVerticalPadding,
    child: child ?? this.child,
    backgroundOverlayLayerOpacity:
        backgroundOverlayLayerOpacity ?? this.backgroundOverlayLayerOpacity,
    shouldActivateOnLongPressOnAllPlatforms:
        shouldActiveOnLongPressOnAllPlatforms ??
            shouldActivateOnLongPressOnAllPlatforms,
    childWidgetRenderBox: _childWidgetRenderBox,
    positionOverride: positionOverride ?? this.positionOverride,
    dismissOnBackgroundTap: dismissOnBackgroundTap,
    shouldIgnorePointer: shouldIgnorePointer ?? this.shouldIgnorePointer,
    onTapInside: onTapInside ?? this.onTapInside,
    onTapOutside: onTapOutside ?? this.onTapOutside,
  );
}