Route.fromJson constructor

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

Implementation

Route.fromJson(Map<String, dynamic> json) {
  encodedPolyline = json['encodedPolyline'];
  distanceInMeters = json['distanceInMeters'];
  timeInMs = json['timeInMs'];
  if (json['instructionList'] != null) {
    instructionList = <Instruction>[];
    json['instructionList'].forEach((v) {
      instructionList?.add(new Instruction.fromJson(v));
    });
  }
}