mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
add close open if it is curtain module for schdule
This commit is contained in:
@ -97,7 +97,8 @@ class ScheduleDialogHelper {
|
||||
setState(() => selectedDays[i] = v);
|
||||
}),
|
||||
const SizedBox(height: 16),
|
||||
_buildFunctionSwitch(ctx, functionOn!, (v) {
|
||||
_buildFunctionSwitch(schedule!.category, ctx, functionOn!,
|
||||
(v) {
|
||||
setState(() => functionOn = v);
|
||||
}),
|
||||
],
|
||||
@ -197,7 +198,7 @@ class ScheduleDialogHelper {
|
||||
}
|
||||
|
||||
static Widget _buildFunctionSwitch(
|
||||
BuildContext ctx, bool isOn, Function(bool) onChanged) {
|
||||
String categor, BuildContext ctx, bool isOn, Function(bool) onChanged) {
|
||||
return Row(
|
||||
children: [
|
||||
Text(
|
||||
@ -211,14 +212,14 @@ class ScheduleDialogHelper {
|
||||
groupValue: isOn,
|
||||
onChanged: (val) => onChanged(true),
|
||||
),
|
||||
const Text('On'),
|
||||
Text(categor == 'CUR_2' ? 'open' : 'On'),
|
||||
const SizedBox(width: 10),
|
||||
Radio<bool>(
|
||||
value: false,
|
||||
groupValue: isOn,
|
||||
onChanged: (val) => onChanged(false),
|
||||
),
|
||||
const Text('Off'),
|
||||
Text(categor == 'CUR_2' ? 'close' : 'Off'),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user