Leg.fromJson constructor

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

Implementation

factory Leg.fromJson(Map<String, dynamic> json) {
  return Leg(
    steps: json['steps'],
    summary: json['summary'],
    weight: json['weight'].toDouble(),
    duration: json['duration'].toDouble(),
    distance: json['distance'].toDouble(),
  );
}