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);
|
setState(() => selectedDays[i] = v);
|
||||||
}),
|
}),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
_buildFunctionSwitch(ctx, functionOn!, (v) {
|
_buildFunctionSwitch(schedule!.category, ctx, functionOn!,
|
||||||
|
(v) {
|
||||||
setState(() => functionOn = v);
|
setState(() => functionOn = v);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
@ -197,7 +198,7 @@ class ScheduleDialogHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Widget _buildFunctionSwitch(
|
static Widget _buildFunctionSwitch(
|
||||||
BuildContext ctx, bool isOn, Function(bool) onChanged) {
|
String categor, BuildContext ctx, bool isOn, Function(bool) onChanged) {
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
@ -211,14 +212,14 @@ class ScheduleDialogHelper {
|
|||||||
groupValue: isOn,
|
groupValue: isOn,
|
||||||
onChanged: (val) => onChanged(true),
|
onChanged: (val) => onChanged(true),
|
||||||
),
|
),
|
||||||
const Text('On'),
|
Text(categor == 'CUR_2' ? 'open' : 'On'),
|
||||||
const SizedBox(width: 10),
|
const SizedBox(width: 10),
|
||||||
Radio<bool>(
|
Radio<bool>(
|
||||||
value: false,
|
value: false,
|
||||||
groupValue: isOn,
|
groupValue: isOn,
|
||||||
onChanged: (val) => onChanged(false),
|
onChanged: (val) => onChanged(false),
|
||||||
),
|
),
|
||||||
const Text('Off'),
|
Text(categor == 'CUR_2' ? 'close' : 'Off'),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user