mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Refactor water heater value selector widget
This commit is contained in:
@ -28,7 +28,11 @@ class WaterHeaterValueSelectorWidget extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final selectedFn = whFunctions.firstWhere(
|
final selectedFn = whFunctions.firstWhere(
|
||||||
(f) => f.code == selectedFunction,
|
(f) => f.code == selectedFunction,
|
||||||
orElse: () => throw Exception('Function $selectedFunction not found'),
|
orElse: () => WHSwitchFunction(
|
||||||
|
deviceId: '',
|
||||||
|
deviceName: '',
|
||||||
|
type: '',
|
||||||
|
),
|
||||||
);
|
);
|
||||||
if (selectedFunction == 'countdown_1') {
|
if (selectedFunction == 'countdown_1') {
|
||||||
return Column(
|
return Column(
|
||||||
|
Reference in New Issue
Block a user