copyWith method

Point copyWith({
  1. GlobeCoordinates? coordinates,
  2. String? label,
  3. Widget? labelBuilder(
    1. BuildContext context,
    2. Point point,
    3. bool isHovering,
    4. bool isVisible,
    )?,
  4. bool? isLabelVisible,
  5. Offset? labelOffset,
  6. String? id,
  7. PointStyle? style,
  8. TextStyle? labelTextStyle,
  9. VoidCallback? onTap,
  10. VoidCallback? onHover,
})

Creates a copy of the Point object with the specified properties overridden.

Implementation

Point copyWith({
  GlobeCoordinates? coordinates,
  String? label,
  Widget? Function(
          BuildContext context, Point point, bool isHovering, bool isVisible)?
      labelBuilder,
  bool? isLabelVisible,
  Offset? labelOffset,
  String? id,
  PointStyle? style,
  TextStyle? labelTextStyle,
  VoidCallback? onTap,
  VoidCallback? onHover,
}) {
  return Point(
    coordinates: coordinates ?? this.coordinates,
    label: label ?? this.label,
    labelBuilder: labelBuilder ?? this.labelBuilder,
    isLabelVisible: isLabelVisible ?? this.isLabelVisible,
    labelOffset: labelOffset ?? this.labelOffset,
    id: id ?? this.id,
    style: style ?? this.style,
    labelTextStyle: labelTextStyle ?? this.labelTextStyle,
    onTap: onTap ?? this.onTap,
    onHover: onHover ?? this.onHover,
  );
}