diff options
author | 2022-12-31 00:34:31 -0500 | |
---|---|---|
committer | 2022-12-31 06:50:16 +0000 | |
commit | 9ba227f63a5f83055910b502ca90bb523950c77b (patch) | |
tree | e8dc553cf3b9264c4081f1bb76a95dd7be2f5afc /lib/vehicle-signals/vehicle_server_path.dart | |
parent | 7e9b0b78a48b4fb26996d67a07277f86b69e18ed (diff) |
Rework Riverpod provider usage
Replace the single Riverpod provider for all vehicle signals with
separate ones for each required signal used directly in the widgets
that require them. This is more in line with recommended Riverpod
practice, and should avoids driving full widget tree rebuilds on
every signal received.
Bug-AGL: SPEC-4660
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Ibe1ff26f8cd95cbe9cbb477feaf31c9f4919bf6a
Diffstat (limited to 'lib/vehicle-signals/vehicle_server_path.dart')
-rw-r--r-- | lib/vehicle-signals/vehicle_server_path.dart | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/vehicle-signals/vehicle_server_path.dart b/lib/vehicle-signals/vehicle_server_path.dart new file mode 100644 index 0000000..822e304 --- /dev/null +++ b/lib/vehicle-signals/vehicle_server_path.dart @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: Apache-2.0 +class VSSPath { + static const String vehicleSpeed = "Vehicle.Speed"; + + static const String vehicleEngineSpeed = + "Vehicle.Powertrain.CombustionEngine.Speed"; + + static const String vehicleFuelLevel = "Vehicle.Powertrain.FuelSystem.Level"; + + static const String vehicleInsideTemperature = + "Vehicle.Cabin.HVAC.AmbientAirTemperature"; + + static const String vehicleOutsideTemperature = + "Vehicle.Exterior.AirTemperature"; + + static const String vehicleFrontLeftTire = + "Vehicle.Chassis.Axle.Row1.Wheel.Left.Tire.Pressure"; + + static const String vehicleFrontRightTire = + "Vehicle.Chassis.Axle.Row1.Wheel.Right.Tire.Pressure"; + + static const String vehicleRearLeftTire = + "Vehicle.Chassis.Axle.Row2.Wheel.Left.Tire.Pressure"; + + static const String vehicleRearRightTire = + "Vehicle.Chassis.Axle.Row2.Wheel.Right.Tire.Pressure"; + + static const String vehicleIsChildLockActiveLeft = + "Vehicle.Cabin.Door.Row2.Left.IsChildLockActive"; + + static const String vehicleIsChildLockActiveRight = + "Vehicle.Cabin.Door.Row2.Right.IsChildLockActive"; + + static const String vehicleCurrentLongitude = + "Vehicle.CurrentLocation.Longitude"; + + static const String vehicleCurrentLatitude = + "Vehicle.CurrentLocation.Latitude"; + + static const String vehicleFuelRate = "Vehicle.OBD.FuelRate"; + + static const String vehicleMediaVolume = + "Vehicle.Cabin.Infotainment.Media.Volume"; +} |