mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 17:47:28 +00:00
schedule for one gang and two gang and three gange
This commit is contained in:
@ -23,7 +23,7 @@ class CreateSchedule extends StatefulWidget {
|
||||
|
||||
class _CreateScheduleState extends State<CreateSchedule> {
|
||||
List<String> selectedDays = []; // List of selected days
|
||||
bool isOn = false; // Boolean state for the ON/OFF toggle
|
||||
bool isOn = true; // Boolean state for the ON/OFF toggle
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -114,19 +114,18 @@ class _CreateScheduleState extends State<CreateSchedule> {
|
||||
children: [
|
||||
Text(
|
||||
isOn ? 'ON' : 'OFF', // Change text based on state
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: isOn ? Colors.green : Colors.red, // Change color based on state
|
||||
),
|
||||
),
|
||||
CircleAvatar(
|
||||
backgroundColor: isOn
|
||||
? ColorsManager.secondaryColor.withOpacity(0.6)
|
||||
: Colors.red.withOpacity(0.6), // Change background color based on state
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.power_settings_new,
|
||||
color: isOn ? Colors.green : Colors.red, // Change icon color
|
||||
color: ColorsManager.onPrimaryColor, // Change icon color
|
||||
),
|
||||
),
|
||||
],
|
||||
|
Reference in New Issue
Block a user