Steps.fromJson constructor

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

Implementation

Steps.fromJson(Map<String, dynamic> json) {
  orientation = json['orientation'];
  assistantAction = json['assistantAction'];
  if (json['cities'] != null) {
    cities = <Cities>[];
    json['cities'].forEach((v) {
      cities!.add(Cities.fromJson(v));
    });
  }
  tollDistance = json['tollDistance'];
  tollRoad = json['tollRoad'];
  road = json['road'];
  action = json['action'];
  instruction = json['instruction'];
  if (json['tmcs'] != null) {
    tmcs = <Tmcs>[];
    json['tmcs'].forEach((v) {
      tmcs!.add(Tmcs.fromJson(v));
    });
  }
  polyline = json['polyline'];
  duration = json['duration'];
  distance = json['distance'];
  tolls = json['tolls'];
}