mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
Implemented side tree to devices and rountines screen
This commit is contained in:
28
lib/pages/routines/models/delay/delay_fucntions.dart
Normal file
28
lib/pages/routines/models/delay/delay_fucntions.dart
Normal 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user