summaryrefslogtreecommitdiffstats
path: root/lib/provider.dart
diff options
context:
space:
mode:
authorScott Murray <scott.murray@konsulko.com>2022-12-24 15:30:10 -0500
committerScott Murray <scott.murray@konsulko.com>2022-12-29 06:34:45 +0000
commitd9c46db74ab0947ae50a47f1aa1a95cadd1020e8 (patch)
treee9cad647d01f546107dfa820363a80c48e33c6e2 /lib/provider.dart
parentb730a26f42117a50d308c50444d3bbb3f0aaa20c (diff)
Rework temperature controls
Rework the temperature controls to use NumberPicker widgets so they function more like a user would expect. The associated Riverpod providers have been updated to track the temperature value directly, and some minor layout tweaks have also been made. Bug-AGL: SPEC-4644 Signed-off-by: Scott Murray <scott.murray@konsulko.com> Change-Id: I069e0bd53c79d73cc7a60045309efdfeb9409fbc
Diffstat (limited to 'lib/provider.dart')
-rw-r--r--lib/provider.dart16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/provider.dart b/lib/provider.dart
index c933fdd..16d65af 100644
--- a/lib/provider.dart
+++ b/lib/provider.dart
@@ -2,24 +2,24 @@
import 'package:flutter_riverpod/flutter_riverpod.dart';
-final LeftSlider = StateNotifierProvider<leftclimate, int>(
- (ref) => leftclimate(),
+final LeftClimateTempProvider = StateNotifierProvider<LeftClimateTemp, int>(
+ (ref) => LeftClimateTemp(),
);
-class leftclimate extends StateNotifier<int> {
- leftclimate() : super(0);
+class LeftClimateTemp extends StateNotifier<int> {
+ LeftClimateTemp() : super(22);
Future<void> update(value) async {
state = value;
}
}
-final RightSlider = StateNotifierProvider<Rightclimate, int>(
- (ref) => Rightclimate(),
+final RightClimateTempProvider = StateNotifierProvider<RightClimateTemp, int>(
+ (ref) => RightClimateTemp(),
);
-class Rightclimate extends StateNotifier<int> {
- Rightclimate() : super(0);
+class RightClimateTemp extends StateNotifier<int> {
+ RightClimateTemp() : super(22);
Future<void> update(value) async {
state = value;