Leg.fromMap constructor
- dynamic legMap
Implementation
factory Leg.fromMap(dynamic legMap){
var list = legMap["steps"] as List<dynamic>;
var stepsList = list.map((e) => Step.fromMap(e)).toList();
return Leg(
duration: legMap["duration"] as double,
steps: stepsList,
distance: legMap["distance"] as double,
);
}