Steps.fromJson constructor

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

Implementation

Steps.fromJson(Map<String, dynamic> json) {
  if (json['TMCs'] != null) {
    TMCs = [];
    json['TMCs'].forEach((v) {
      TMCs?.add(TMC.fromJson(v));
    });
  }
  action = json['action'];
  assistantAction = json['assistantAction'];
  distance = json['distance'];
  duration = json['duration'];
  instruction = json['instruction'];
  orientation = json['orientation'];
  if (json['polyline'] != null) {
    polyline = [];
    json['polyline'].forEach((v) {
      polyline?.add(LatLng.fromJson(v));
    });
  }
  road = json['road'];
  if (json['routeSearchCityList'] != null) {
    routeSearchCityList = [];
    json['routeSearchCityList'].forEach((v) {
      routeSearchCityList?.add(RouteSearchCityList.fromJson(v));
    });
  }
  tollDistance = json['tollDistance'];
  tollRoad = json['tollRoad'];
  tolls = json['tolls'];
}