copyWith method

GlobeCoordinates copyWith({
  1. double? latitude,
  2. double? longitude,
})

Creates a copy of the GlobeCoordinates object with optional new latitude and longitude values.

If latitude or longitude is provided, the corresponding value will be updated in the new object.

Implementation

GlobeCoordinates copyWith({
  double? latitude,
  double? longitude,
}) {
  return GlobeCoordinates(
    latitude ?? this.latitude,
    longitude ?? this.longitude,
  );
}