copyWith method
Creates a new Polyline object whose values are the same as this instance, unless overwritten by the specified parameters.
Implementation
Polyline copyWith({
Color? colorParam,
bool? consumeTapEventsParam,
Cap? endCapParam,
bool? geodesicParam,
JointType? jointTypeParam,
List<PatternItem>? patternsParam,
List<LatLng>? pointsParam,
Cap? startCapParam,
bool? visibleParam,
int? widthParam,
int? zIndexParam,
VoidCallback? onTapParam,
}) {
return Polyline(
polylineId: polylineId,
color: colorParam ?? color,
consumeTapEvents: consumeTapEventsParam ?? consumeTapEvents,
endCap: endCapParam ?? endCap,
geodesic: geodesicParam ?? geodesic,
jointType: jointTypeParam ?? jointType,
patterns: patternsParam ?? patterns,
points: pointsParam ?? points,
startCap: startCapParam ?? startCap,
visible: visibleParam ?? visible,
width: widthParam ?? width,
onTap: onTapParam ?? onTap,
zIndex: zIndexParam ?? zIndex,
);
}