schedule for one gang and two gang and three gange

This commit is contained in:
mohammad
2024-09-18 12:59:28 +03:00
parent ddaf36797d
commit 42b5ff105f
24 changed files with 1872 additions and 631 deletions

View File

@ -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
),
),
],