create static method

Polyline create({
  1. required String id,
  2. required SmartRoute route,
  3. Color color = const Color(0xFF2196F3),
  4. int width = 5,
})

Returns a Polyline object ready for Google Maps.

Implementation

static Polyline create({
  required String id,
  required SmartRoute route,
  Color color = const Color(0xFF2196F3),
  int width = 5,
}) {
  return Polyline(
    polylineId: PolylineId(id),
    points: route.points,
    color: color,
    width: width,
    jointType: JointType.round,
    startCap: Cap.roundCap,
    endCap: Cap.roundCap,
  );
}