mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-15 01:35:23 +00:00
bugs fixes
This commit is contained in:
@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
Reference in New Issue
Block a user