copyWith method

Polyline copyWith (
  1. {List<LatLng> pointsParam,
  2. double widthParam,
  3. int zIndexParam,
  4. bool visibleParam,
  5. double alphaParam,
  6. DashLineType dashLineTypeParam,
  7. CapType capTypeParam,
  8. JoinType joinTypeParam,
  9. BitmapDescriptor customTextureParam,
  10. ArgumentCallback<String> onTapParam,
  11. Color colorParam}
)

实际copy函数

Implementation

Polyline copyWith({
  List<LatLng> pointsParam,
  double widthParam,
  int zIndexParam,
  bool visibleParam,
  double alphaParam,
  DashLineType dashLineTypeParam,
  CapType capTypeParam,
  JoinType joinTypeParam,
  BitmapDescriptor customTextureParam,
  ArgumentCallback<String> onTapParam,
  Color colorParam,
}) {
  Polyline copyPolyline = Polyline(
    points: pointsParam ?? points,
    width: widthParam ?? width,
    visible: visibleParam ?? visible,
    geodesic: geodesic,
    alpha: alphaParam ?? alpha,
    dashLineType: dashLineTypeParam ?? dashLineType,
    capType: capTypeParam ?? capType,
    joinType: joinTypeParam ?? joinType,
    customTexture: customTextureParam ?? customTexture,
    onTap: onTapParam ?? onTap,
    color: colorParam ?? color,
  );
  copyPolyline.setIdForCopy(id);
  return copyPolyline;
}