Leg.fromJson constructor

Leg.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Leg.fromJson(Map<String, dynamic> json) {
  return Leg._(
    maneuvers: List.castFrom(json['maneuvers'])
        .map((maneuver) => Maneuver.fromJson(maneuver))
        .toList(),
    summary: Summary.fromJson(json['summary']),
    shape: json['shape'],
  );
}