Vehicle class
Defines a Vehicle
data model class.
This class represents a Tesla vehicle and encapsulates all the data related to it.
Constructors
-
Vehicle({String? id, String? userId, String? vehicleId, String? vin, String? displayName, String? optionCodes, String? color, List<
String> ? tokens, String? state, bool? inService, String? idS, bool? calendarEnabled, String? backseatToken, String? backseatTokenUpdatedAt, GuiSettings? guiSettings, VehicleState? vehicleState, ClimateState? climateState, ChargeState? chargeState, DriveState? driveState, VehicleConfig? vehicleConfig}) - Creates a new instance of the Vehicle.
-
Vehicle.fromJson(Map<
String, dynamic> json) -
Constructs a new Vehicle instance from a map.
factory
Properties
- backseatToken → String?
-
The backseat token associated with the vehicle.
final
- backseatTokenUpdatedAt → String?
-
The timestamp of the last update to the backseat token.
final
- calendarEnabled → bool?
-
Whether the vehicle's calendar is enabled.
final
- chargeState → ChargeState?
-
The state of the vehicle's battery and charging system.
final
- climateState → ClimateState?
-
The state of the vehicle's climate control system.
final
- color → String?
-
The color of the vehicle.
final
- displayName → String?
-
The name of the vehicle as displayed in the Tesla app.
final
- driveState → DriveState?
-
The drive state of the vehicle (e.g., speed, power).
final
- guiSettings → GuiSettings?
-
The GUI settings of the vehicle.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String?
-
The unique identifier of the vehicle.
final
- idS → String?
-
A secondary unique identifier for the vehicle.
final
- inService → bool?
-
Whether the vehicle is in service.
final
- optionCodes → String?
-
The option codes representing the vehicle's configuration.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → String?
-
The current state of the vehicle (e.g., online, asleep).
final
-
tokens
→ List<
String> ? -
List of tokens associated with the vehicle.
final
- userId → String?
-
The unique identifier of the user who owns the vehicle.
final
- vehicleConfig → VehicleConfig?
-
The configuration of the vehicle (e.g., car type, roof color).
final
- vehicleId → String?
-
The unique identifier of the vehicle provided by the manufacturer.
final
- vehicleState → VehicleState?
-
The state of the vehicle (e.g., driving, charging).
final
- vin → String?
-
The Vehicle Identification Number (VIN) 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