toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final data = <String, dynamic>{};
  data['restriction'] = this.restriction;
  if (this.steps != null) {
    data['steps'] = this.steps?.map((v) => v.toJson()).toList();
  }
  data['strategy'] = this.strategy;
  data['tollDistance'] = this.tollDistance;
  data['totalDuration'] = this.totalDuration;
  data['totalDistance'] = this.totalDistance;
  data['tolls'] = this.tolls;
  data['totalTrafficlights'] = this.totalTrafficlights;
  return data;
}