CarProfile class
Car routing profile.
Profile used for car routing. Extends MotorVehicleProfile and exposes parameters relevant when computing car routes.
See also:
- RoutePreferences - Include a CarProfile when requesting car routes.
- Inheritance
-
- Object
- VehicleRegistration
- MotorVehicleProfile
- CarProfile
Constructors
- CarProfile({int mass = 0, FuelType fuel = FuelType.petrol, double maxSpeed = 0.0, String plateNumber = ''})
- Car profile constructor with predefined FuelType.petrol as fuel type.
-
CarProfile.fromJson(Map<
String, dynamic> json) -
Deserializes a JSON-compatible map to create an instance.
factory
Properties
- fuel ↔ FuelType
-
Engine fuel type. Default is FuelType.petrol.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- mass ↔ int
-
Vehicle mass in kg. By default it is 0 and is not considered in routing.
getter/setter pairinherited
- maxSpeed ↔ double
-
Vehicle maximum speed in m/s. By default it is 0 and is not considered in routing.
getter/setter pairinherited
- plateNumber ↔ String
-
Vehicle plate number.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes this instance to a JSON-compatible map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
covariant CarProfile other) → bool -
The equality operator.
override