copyWith method

Polyline copyWith({
  1. Color? colorParam,
  2. bool? consumeTapEventsParam,
  3. Cap? endCapParam,
  4. bool? geodesicParam,
  5. JointType? jointTypeParam,
  6. List<PatternItem>? patternsParam,
  7. List<LatLng>? pointsParam,
  8. Cap? startCapParam,
  9. bool? visibleParam,
  10. int? widthParam,
  11. int? zIndexParam,
  12. VoidCallback? onTapParam,
})

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,
  );
}