DriveState.fromJson constructor
Creates a new instance of the DriveState class from a map.
The json
argument is a Map with string keys and dynamic values. Each key corresponds to a property of the DriveState class.
Implementation
factory DriveState.fromJson(Map<String, dynamic> json) {
return DriveState(
shiftState: json['shift_state'],
speed: json['speed'],
power: json['power'],
latitude: json['latitude'],
longitude: json['longitude'],
heading: json['heading'],
gpsAsOf: json['gps_as_of'],
nativeLocationSupported: json['native_location_supported'],
nativeLatitude: json['native_latitude'],
nativeLongitude: json['native_longitude'],
nativeType: json['native_type'],
timestamp: json['timestamp'],
);
}