Step.fromJson constructor

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

Implementation

factory Step.fromJson(Map<String, dynamic> json) => Step(
    distance: json["distance"]?.toDouble(),
    duration: json["duration"]?.toDouble(),
    type: json["type"],
    instruction: json["instruction"],
    name: json["name"],
    wayPoints: List<int>.from(json["way_points"].map((x) => x)),
);