summaryrefslogtreecommitdiffstats
path: root/lib/data/data_providers/vehicle_notifier.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/data/data_providers/vehicle_notifier.dart')
-rw-r--r--lib/data/data_providers/vehicle_notifier.dart12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/data/data_providers/vehicle_notifier.dart b/lib/data/data_providers/vehicle_notifier.dart
index 6583f9a..1dc4627 100644
--- a/lib/data/data_providers/vehicle_notifier.dart
+++ b/lib/data/data_providers/vehicle_notifier.dart
@@ -3,12 +3,12 @@
import 'dart:async';
import 'package:flutter_ics_homescreen/export.dart';
-import 'package:protos/val-api.dart';
+import 'package:protos/val_api.dart';
class VehicleNotifier extends Notifier<Vehicle> {
@override
Vehicle build() {
- return Vehicle.initial();
+ return const Vehicle.initial();
}
void updateSpeed(double newValue) {
@@ -103,11 +103,13 @@ class VehicleNotifier extends Notifier<Vehicle> {
// Convert 0-100 to local 0-3 setting
var value = entry.value.uint32;
var fanSpeed = 0;
- if (value > 66)
+ if (value > 66) {
fanSpeed = 3;
- else if (value > 33)
+ }
+ else if (value > 33) {
fanSpeed = 2;
- else if (value > 0) fanSpeed = 1;
+ }
+ else if (value > 0) { fanSpeed = 1; }
state = state.copyWith(fanSpeed: fanSpeed);
}
break;