copyWith method

VisiblePoint copyWith({
  1. Offset? position,
  2. bool? isHovering,
  3. bool? isVisible,
  4. Size? size,
})

Creates a copy of the VisiblePoint with optional modifications.

position (optional) specifies a new position for the visible point. size specifies the size of the widget to render. isHovering (optional) specifies whether the visible point is being hovered over. isVisible (optional) specifies whether the visible point is currently visible.

Returns a new instance of VisiblePoint with the specified modifications.

Implementation

VisiblePoint copyWith({
  Offset? position,
  bool? isHovering,
  bool? isVisible,
  Size? size,
}) {
  return VisiblePoint(
    key: key,
    id: id,
    size: size ?? this.size,
    position: position ?? this.position,
    isHovering: isHovering ?? this.isHovering,
    isVisible: isVisible ?? this.isVisible,
  );
}