summaryrefslogtreecommitdiffstats
path: root/lib/provider.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/provider.dart')
-rw-r--r--lib/provider.dart37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/provider.dart b/lib/provider.dart
new file mode 100644
index 0000000..c933fdd
--- /dev/null
+++ b/lib/provider.dart
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: Apache-2.0
+
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+
+final LeftSlider = StateNotifierProvider<leftclimate, int>(
+ (ref) => leftclimate(),
+);
+
+class leftclimate extends StateNotifier<int> {
+ leftclimate() : super(0);
+
+ Future<void> update(value) async {
+ state = value;
+ }
+}
+
+final RightSlider = StateNotifierProvider<Rightclimate, int>(
+ (ref) => Rightclimate(),
+);
+
+class Rightclimate extends StateNotifier<int> {
+ Rightclimate() : super(0);
+
+ Future<void> update(value) async {
+ state = value;
+ }
+}
+
+final fanSpeedProvider =
+ StateNotifierProvider<fanslider, int>((ref) => fanslider());
+
+class fanslider extends StateNotifier<int> {
+ fanslider() : super(30);
+ void update(value) {
+ state = value;
+ }
+}