copyWith method

  1. @override
LatLngInfo copyWith({
  1. double? latitude,
  2. double? longitude,
  3. double? bearing,
  4. MarkerId? markerId,
  5. bool? isStopover,
  6. bool? ripple,
  7. bool? isEmpty,
  8. double? mapScale,
  9. Map<String, dynamic>? markerJson,
})
override

Implementation

@override
LatLngInfo copyWith({
  double? latitude,
  double? longitude,
  double? bearing,
  MarkerId? markerId,
  bool? isStopover,
  bool? ripple,
  bool? isEmpty,
  double? mapScale,
  Map<String, dynamic>? markerJson,
}) {
  if ((latitude == null || identical(latitude, this.latitude)) &&
      (longitude == null || identical(longitude, this.longitude)) &&
      (bearing == null || identical(bearing, this.bearing)) &&
      (markerId == null || identical(markerId, this.markerId)) &&
      (isStopover == null || identical(isStopover, this.isStopover)) &&
      (ripple == null || identical(ripple, this.ripple)) &&
      (isEmpty == null || identical(isEmpty, this.isEmpty)) &&
      (mapScale == null || identical(mapScale, this.mapScale)) &&
      (markerJson == null ||
          identical(markerJson, this.markerJson) ||
          mapEquals(markerJson, this.markerJson))) {
    return this;
  }

  return LatLngInfo(
    latitude ?? this.latitude,
    longitude ?? this.longitude,
    markerId ?? this.markerId,
    bearing: bearing ?? this.bearing,
    isStopover: isStopover ?? this.isStopover,
    ripple: ripple ?? this.ripple,
    mapScale: mapScale ?? this.mapScale,
    markerJson: markerJson ?? this.markerJson,
  );
}