Segment.fromMap constructor

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

Implementation

factory Segment.fromMap(Map<String, dynamic> json) => Segment(
      distance: json["distance"],
      duration: json["duration"],
      steps: json["steps"] == null
          ? []
          : List<StepWay>.from(json["steps"]!.map((x) => StepWay.fromMap(x))),
      ascent: json["ascent"],
      descent: json["descent"],
    );