Segment.fromJson constructor

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

Implementation

factory Segment.fromJson(Map<String, dynamic> json) => Segment(
    distance: json["distance"]?.toDouble(),
    duration: json["duration"]?.toDouble(),
    steps: List<Step>.from(json["steps"].map((x) => Step.fromJson(x))),
);