copyWith method
- List<
PowerGeoPoint> ? geoJSONPoints, - List<
PowerGeoLineString> ? geoJSONLineStrings, - List<
PowerGeoPolygon> ? geoJSONPolygons,
Creates a copy of the PowerGeoJSONFeatureCollection with optional updates to its properties.
geoJSONPoints: Optional updated list of PowerGeoPoint instances.geoJSONLineStrings: Optional updated list of PowerGeoLineString instances.geoJSONPolygons: Optional updated list of PowerGeoPolygon instances.
Returns a new PowerGeoJSONFeatureCollection instance.
Implementation
PowerGeoJSONFeatureCollection copyWith({
List<PowerGeoPoint>? geoJSONPoints,
List<PowerGeoLineString>? geoJSONLineStrings,
List<PowerGeoPolygon>? geoJSONPolygons,
}) {
return PowerGeoJSONFeatureCollection(
geoJSONPoints: geoJSONPoints ?? this.geoJSONPoints,
geoJSONLineStrings: geoJSONLineStrings ?? this.geoJSONLineStrings,
geoJSONPolygons: geoJSONPolygons ?? this.geoJSONPolygons,
);
}