diff options
author | Scott Murray <scott.murray@konsulko.com> | 2022-12-24 15:30:10 -0500 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2022-12-29 01:22:55 -0500 |
commit | fe23ca5ecdabd698917c4e84915151fc32cb335e (patch) | |
tree | e9cad647d01f546107dfa820363a80c48e33c6e2 /lib/main.dart | |
parent | 467221c592123125d6439871f02ef5e9ca0fe777 (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/main.dart')
-rw-r--r-- | lib/main.dart | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/main.dart b/lib/main.dart index b2758de..32203fa 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,13 +1,19 @@ // SPDX-License-Identifier: Apache-2.0 import 'dart:io'; +import 'dart:ui'; import 'package:flutter/material.dart'; import 'package:flutter_hvac/config.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'kuksa-server/vehicle_config.dart'; - +class MyCustomScrollBehavior extends MaterialScrollBehavior { + // Override behavior methods and getters like dragDevices + @override + Set<PointerDeviceKind> get dragDevices => + {PointerDeviceKind.mouse, PointerDeviceKind.touch}; +} Future<void> main() async { WidgetsFlutterBinding.ensureInitialized(); @@ -16,6 +22,7 @@ Future<void> main() async { runApp( ProviderScope( child: MaterialApp( + scrollBehavior: MyCustomScrollBehavior(), home: GetConfig(client: client), ), ), |