VehicleList.fromJson constructor
Constructs a new VehicleList instance from a map.
This constructor is typically used for constructing a new VehicleList instance from a JSON object that has been deserialized into a map. The map keys correspond to the property names of VehicleList and the map values are the respective values of these properties.
Implementation
factory VehicleList.fromJson(Map<String, dynamic> json) {
return VehicleList(
response:
(json['response'] as List).map((i) => Vehicle.fromJson(i)).toList(),
count: json['count'],
);
}