Legs.fromJson constructor

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

Implementation

Legs.fromJson(Map<String, dynamic> json) {
  distance = json['distance'];
  duration = json['duration'];
  summary = json['summary'];
  if (json['steps'] != null) {
    steps = <Steps>[];
    json['steps'].forEach((v) {
      steps!.add(Steps.fromJson(v));
    });
  }
}