DrivePath.fromJson constructor

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

Implementation

DrivePath.fromJson(Map<String, dynamic> json) {
  restriction = json['restriction'];
  if (json['steps'] != null) {
    steps = [];
    json['steps'].forEach((v) {
      steps?.add(Steps.fromJson(v));
    });
  }
  strategy = json['strategy'];
  tollDistance = json['tollDistance'];
  totalDuration = json['totalDuration'];
  totalDistance = json['totalDistance'];
  tolls = json['tolls'];
  totalTrafficlights = json['totalTrafficlights'];
}