DriveState class

A class that represents the current drive state of a vehicle.

Each instance holds data related to the vehicle's shift state, speed, power, geographic location, GPS data, native location data, and more.

Constructors

DriveState({String? shiftState, String? speed, int? power, double? latitude, double? longitude, int? heading, int? gpsAsOf, int? nativeLocationSupported, double? nativeLatitude, double? nativeLongitude, String? nativeType, int? timestamp})
Constructs a new instance of the DriveState class.
DriveState.fromJson(Map<String, dynamic> json)
Creates a new instance of the DriveState class from a map.
factory

Properties

gpsAsOf int?
The timestamp when the GPS data was last updated.
final
hashCode int
The hash code for this object.
no setterinherited
heading int?
The current heading of the vehicle in degrees (0-360).
final
latitude double?
The current latitude of the vehicle's location.
final
longitude double?
The current longitude of the vehicle's location.
final
nativeLatitude double?
The latitude as reported by the native location system.
final
nativeLocationSupported int?
Whether the native location system is supported (1 for supported, 0 for not supported).
final
nativeLongitude double?
The longitude as reported by the native location system.
final
nativeType String?
The type of the native location system.
final
power int?
The current power being used by the vehicle in kW.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shiftState String?
The current shift state of the vehicle (e.g., "P" for Park, "D" for Drive, etc.).
final
speed String?
The current speed of the vehicle in km/h.
final
timestamp int?
The timestamp when the data was recorded.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited