summaryrefslogtreecommitdiffstats
path: root/lib/data/data_providers
diff options
context:
space:
mode:
authorLisandro Pérez Meyer <lpmeyer@ics.com>2023-11-16 15:42:22 -0300
committerLisandro Pérez Meyer <lpmeyer@ics.com>2023-11-16 15:47:49 -0300
commit6a00ac1f8613048b5c1f7ecdbd1adcbbcfdca5ed (patch)
tree8cdd919f84a50007ae0364cba37bb8bdaf19f5fc /lib/data/data_providers
parent94b78fd369c318baf1a98d4f510d791ea9f17017 (diff)
Disable value animation at start up % update FuelLevel path.
Remove some warnings. Original from: Dominik Wawrzonek <dwawrzonek@ics.com> Bug-AGL: SPEC-4971 Change-Id: I3693fa74f7995b4dcb016812403ed800702cb81c Signed-off-by: Lisandro Pérez Meyer <lpmeyer@ics.com>
Diffstat (limited to 'lib/data/data_providers')
-rw-r--r--lib/data/data_providers/hybrid_notifier.dart4
-rw-r--r--lib/data/data_providers/vehicle_notifier.dart11
2 files changed, 9 insertions, 6 deletions
diff --git a/lib/data/data_providers/hybrid_notifier.dart b/lib/data/data_providers/hybrid_notifier.dart
index a19bf58..fd16a68 100644
--- a/lib/data/data_providers/hybrid_notifier.dart
+++ b/lib/data/data_providers/hybrid_notifier.dart
@@ -1,3 +1,5 @@
+// ignore_for_file: unused_local_variable
+
import '../../export.dart';
class HybridNotifier extends StateNotifier<Hybrid> {
@@ -83,7 +85,7 @@ class HybridNotifier extends StateNotifier<Hybrid> {
// currentState = HybridState.baterryOutput;
// }
- // Zaktualizuj stan
+ // Update hybrid state
if (currentState != previousState) {
state = state.copyWith(hybridState: currentState);
}
diff --git a/lib/data/data_providers/vehicle_notifier.dart b/lib/data/data_providers/vehicle_notifier.dart
index 012e5dc..fb69595 100644
--- a/lib/data/data_providers/vehicle_notifier.dart
+++ b/lib/data/data_providers/vehicle_notifier.dart
@@ -1,3 +1,5 @@
+// ignore_for_file: unused_local_variable
+
import 'dart:async';
import 'package:flutter_ics_homescreen/export.dart';
@@ -55,8 +57,8 @@ class VehicleNotifier extends StateNotifier<Vehicle> {
}
break;
case VSSPath.vehicleFuelLevel:
- if (update.entry.value.hasFloat()) {
- state = state.copyWith(fuelLevel: update.entry.value.float);
+ if (update.entry.value.hasUint32()) {
+ state = state.copyWith(fuelLevel: update.entry.value.uint32);
}
break;
// case VSSPath.vehicleMediaVolume:
@@ -290,7 +292,6 @@ class VehicleNotifier extends StateNotifier<Vehicle> {
// });
}
try {
- // ignore: unused_local_variable
Map<String, String> metadata = {};
//var responseStream = _stub.subscribe(request);
stub.subscribe(request).listen((value) async {
@@ -434,11 +435,11 @@ class VehicleNotifier extends StateNotifier<Vehicle> {
actualFuelLevel = actualFuelLevel + 1;
if (actualFuelLevel > fuelLevel) {
- actualFuelLevel = fuelLevel;
+ actualFuelLevel = fuelLevel.toDouble();
timer.cancel();
}
- state = state.copyWith(fuelLevel: actualFuelLevel);
+ state = state.copyWith(fuelLevel: actualFuelLevel.toInt());
});
Timer outsideTemperatureTimer =
Timer.periodic(const Duration(milliseconds: 300), (timer) {