diff options
author | 2022-09-01 20:46:09 +0200 | |
---|---|---|
committer | 2022-09-16 18:24:43 +0200 | |
commit | 10945b8056eb2b228c156918a3505882a49a79b8 (patch) | |
tree | c8190f53a85ceaf31d9b978cb3d61941bb7a8bc4 /lib/Kuksa-server/vehicle_class.dart | |
parent | cb0d87bfb6b6daf9ad22ab76d333e70451602406 (diff) |
Upload Flutter-Dashboard app for IVI
Flutter Dashboard app which shows Tyres Pressure,
Child lock status , Current Location,Speed,RPM,outside
and inside Temperature , Average fuel Consumption.
update UI and Removed Unused code.
Moved kuksa authtoken and mapbox access token and other
things to config file.
Bug-AGL: SPEC-4547
Signed-off-by: Hritik Chouhan <hritikc3961@gmail.com>
Change-Id: I14f42ed453c8279a1e89f8835d2b24e07e4ce376
Diffstat (limited to 'lib/Kuksa-server/vehicle_class.dart')
-rw-r--r-- | lib/Kuksa-server/vehicle_class.dart | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/lib/Kuksa-server/vehicle_class.dart b/lib/Kuksa-server/vehicle_class.dart new file mode 100644 index 0000000..c2f2ac2 --- /dev/null +++ b/lib/Kuksa-server/vehicle_class.dart @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: Apache-2.0 +class VehicleSignal { + VehicleSignal({ + required this.speed, + required this.rpm, + required this.fuelLevel, + required this.frontLeftTP, + required this.frontRightTP, + required this.rearLeftTP, + required this.rearRightTP, + required this.isBatteryCharging, + required this.isChildLockActiveLeft, + required this.isChildLockActiveRight, + required this.currentLatitude, + required this.currentLongitude, + required this.fuelRate, + required this.insideTemperature, + required this.outsideTemperature, + }); + + final double speed; + final double rpm; + final double fuelLevel; + final double frontLeftTP; + final double frontRightTP; + final double rearLeftTP; + final double rearRightTP; + final bool isChildLockActiveLeft; + final bool isChildLockActiveRight; + final double currentLongitude; + final double currentLatitude; + final double fuelRate; + final int insideTemperature; + final int outsideTemperature; + + final bool isBatteryCharging; + + VehicleSignal copyWith({ + double? speed, + double? rpm, + double? fuelLevel, + double? frontLeftTP, + double? frontRightTP, + double? rearLeftTP, + double? rearRightTP, + bool? isBatteryCharging, + bool? isChildLockActiveLeft, + bool? isChildLockActiveRight, + double? currentLongitude, + double? currentLatitude, + double? fuelRate, + int? insideTemperature, + int? outsideTemperature, + }) { + return VehicleSignal( + speed: speed ?? this.speed, + rpm: rpm ?? this.rpm, + fuelLevel: fuelLevel ?? this.fuelLevel, + frontLeftTP: frontLeftTP ?? this.frontLeftTP, + frontRightTP: frontRightTP ?? this.frontRightTP, + rearLeftTP: rearLeftTP ?? this.rearLeftTP, + rearRightTP: rearRightTP ?? this.rearRightTP, + isChildLockActiveLeft: + isChildLockActiveLeft ?? this.isChildLockActiveLeft, + isChildLockActiveRight: + isChildLockActiveRight ?? this.isChildLockActiveRight, + isBatteryCharging: isBatteryCharging ?? this.isBatteryCharging, + currentLatitude: currentLatitude ?? this.currentLatitude, + currentLongitude: currentLongitude ?? this.currentLongitude, + fuelRate: fuelRate ?? this.fuelRate, + insideTemperature: insideTemperature ?? this.insideTemperature, + outsideTemperature: outsideTemperature ?? this.outsideTemperature, + ); + } +} |