VehicleState class

Defines a VehicleState data model class.

This class represents the state of a Tesla vehicle and encapsulates all the data related to it.

Constructors

VehicleState({int? apiVersion, String? autoparkState, String? autoparkStateV2, String? autoparkStyle, bool? calendarSupported, String? carVersion, int? centerDisplayState, int? df, int? dr, int? ft, bool? homelinkNearby, String? lastAutoparkError, bool? locked, bool? notificationsSupported, double? odometer, bool? parsedCalendarSupported, int? pf, int? pr, bool? remoteStart, bool? remoteStartSupported, int? rt, int? sunRoofPercentOpen, String? sunRoofState, int? timestamp, bool? valetMode, String? vehicleName})
Creates a new instance of the VehicleState.
VehicleState.fromJson(Map<String, dynamic> json)
Constructs a new VehicleState instance from a map.
factory

Properties

apiVersion int?
The version of the Tesla API being used.
final
autoparkState String?
The current autopark state of the vehicle.
final
autoparkStateV2 String?
The second version of the autopark state.
final
autoparkStyle String?
The autopark style of the vehicle.
final
calendarSupported bool?
Indicates if the calendar is supported in the vehicle.
final
carVersion String?
The version of the car software.
final
centerDisplayState int?
The state of the center display (0 = off, 2 = on).
final
df int?
The state of the driver's door (0 = closed, 1 = open).
final
dr int?
The state of the rear driver side door (0 = closed, 1 = open).
final
ft int?
The state of the front trunk, also known as the 'frunk' (0 = closed, 1 = open).
final
hashCode int
The hash code for this object.
no setterinherited
homelinkNearby bool?
Indicates if Homelink is nearby.
final
lastAutoparkError String?
The last autopark error.
final
locked bool?
Indicates if the vehicle is locked.
final
notificationsSupported bool?
Indicates if notifications are supported.
final
odometer double?
The current odometer reading of the vehicle.
final
parsedCalendarSupported bool?
Indicates if parsed calendar is supported.
final
pf int?
The state of the passenger door (0 = closed, 1 = open).
final
pr int?
The state of the rear passenger door (0 = closed, 1 = open).
final
remoteStart bool?
Indicates if the vehicle is in remote start mode.
final
remoteStartSupported bool?
Indicates if remote start is supported.
final
rt int?
The state of the rear trunk, also known as the 'trunk' (0 = closed, 1 = open).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sunRoofPercentOpen int?
The percentage the sun roof is open (0 - 100).
final
sunRoofState String?
The current state of the sun roof.
final
timestamp int?
A timestamp when the vehicle state was last updated.
final
valetMode bool?
Indicates if valet mode is active.
final
vehicleName String?
The name of the vehicle.
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