DriveRouteResult.fromJson constructor

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

Implementation

DriveRouteResult.fromJson(Map<String, dynamic> json) {
  if (json['paths'] != null) {
    paths = [];
    json['paths'].forEach((v) {
      paths?.add(DrivePath.fromJson(v));
    });
  }
  startPos = json['startPos'] != null ? LatLng.fromJson(json['startPos']) : null;
  targetPos = json['targetPos'] != null ? LatLng.fromJson(json['targetPos']) : null;
  taxiCost = json['taxiCost'];
}