Path.fromJson constructor

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

Implementation

Path.fromJson(Map<String, dynamic> json) {
  restriction = json['restriction'];
  polyline = json['polyline'];
  distance = json['distance'];
  if (json['steps'] != null) {
    steps = <Steps>[];
    json['steps'].forEach((v) {
      steps!.add(Steps.fromJson(v));
    });
  }
  totalTrafficLights = json['totalTrafficLights'];
  duration = json['duration'];
  strategy = json['strategy'];
  tollDistance = json['tollDistance'];
  tolls = json['tolls'];
}