bugs fixes

This commit is contained in:
mohammad
2024-10-03 12:46:56 +03:00
parent cc7af3e4e6
commit d9761168e6
11 changed files with 181 additions and 140 deletions

View File

@ -4,7 +4,10 @@ import 'package:syncrow_app/utils/resource_manager/color_manager.dart';
class DevicesDefaultSwitch extends StatelessWidget {
const DevicesDefaultSwitch(
{super.key, required this.switchValue, required this.action, this.secondAction});
{super.key,
required this.switchValue,
required this.action,
this.secondAction});
final bool switchValue;
final Function action;
@ -22,7 +25,9 @@ class DevicesDefaultSwitch extends StatelessWidget {
child: Container(
height: 60,
decoration: BoxDecoration(
color: switchValue ? ColorsManager.primaryColor : Colors.white,
color: switchValue
? ColorsManager.switchButton.withOpacity(0.6)
: Colors.white,
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(15),
bottomLeft: Radius.circular(15),
@ -30,9 +35,10 @@ class DevicesDefaultSwitch extends StatelessWidget {
),
child: Center(
child: BodyMedium(
fontSize: 14,
text: "ON",
fontColor: switchValue ? Colors.white : null,
fontWeight: FontWeight.bold,
fontWeight: FontWeight.w700,
),
),
),
@ -50,7 +56,9 @@ class DevicesDefaultSwitch extends StatelessWidget {
child: Container(
height: 60,
decoration: BoxDecoration(
color: switchValue ? Colors.white : ColorsManager.primaryColor,
color: switchValue
? Colors.white
: ColorsManager.switchButton.withOpacity(0.6),
borderRadius: const BorderRadius.only(
topRight: Radius.circular(15),
bottomRight: Radius.circular(15),
@ -58,9 +66,10 @@ class DevicesDefaultSwitch extends StatelessWidget {
),
child: Center(
child: BodyMedium(
fontSize: 14,
text: "OFF",
fontColor: switchValue ? null : Colors.white,
fontWeight: FontWeight.bold,
fontWeight: FontWeight.w700,
),
),
),