Implemented side tree to devices and rountines screen

This commit is contained in:
Abdullah Alassaf
2025-01-04 17:45:15 +03:00
parent 0341844ea9
commit a98f7e77a3
88 changed files with 1551 additions and 1202 deletions

View File

@ -0,0 +1,28 @@
import 'package:syncrow_web/pages/routines/models/gang_switches/base_switch_function.dart';
import 'package:syncrow_web/pages/routines/models/gang_switches/switch_operational_value.dart';
import 'package:syncrow_web/utils/constants/assets.dart';
class DelayFunction extends BaseSwitchFunction {
DelayFunction({required super.deviceId, required super.deviceName})
: super(
code: 'delay',
operationName: 'Delay',
icon: Assets.delay,
);
@override
List<SwitchOperationalValue> getOperationalValues() => [
SwitchOperationalValue(
icon: '',
description: "Duration in seconds",
value: 0.0,
minValue: 0,
maxValue: 43200,
stepValue: 1,
),
];
int convertToSeconds(int hours, int minutes) {
return (hours * 3600) + (minutes * 60);
}
}