toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      "weight_name": weightName,
      "weight": weight,
      "duration": duration,
      "distance": distance,
      "legs": List<dynamic>.from(legs.map((x) => x.toJson())),
      "geometry": geometry,
    };