mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-11-26 22:24:56 +00:00
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/bloc/living_room_bloc.dart';
|
||||
@ -6,11 +7,7 @@ import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
|
||||
class CeilingLight extends StatelessWidget {
|
||||
const CeilingLight(
|
||||
{super.key,
|
||||
required this.value,
|
||||
required this.code,
|
||||
required this.deviceId});
|
||||
const CeilingLight({super.key, required this.value, required this.code, required this.deviceId});
|
||||
|
||||
final bool value;
|
||||
final String code;
|
||||
@ -26,7 +23,7 @@ class CeilingLight extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
ClipOval(
|
||||
child: ColoredBox(
|
||||
child: Container(
|
||||
color: ColorsManager.whiteColors,
|
||||
child: SvgPicture.asset(
|
||||
Assets.lightPulp,
|
||||
@ -40,7 +37,7 @@ class CeilingLight extends StatelessWidget {
|
||||
width: 35,
|
||||
child: CupertinoSwitch(
|
||||
value: value,
|
||||
activeTrackColor: ColorsManager.dialogBlueTitle,
|
||||
activeColor: ColorsManager.dialogBlueTitle,
|
||||
onChanged: (newValue) {
|
||||
context.read<LivingRoomBloc>().add(
|
||||
LivingRoomControl(
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/bloc/living_room_bloc.dart';
|
||||
@ -6,11 +7,7 @@ import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
|
||||
class SpotLight extends StatelessWidget {
|
||||
const SpotLight(
|
||||
{super.key,
|
||||
required this.value,
|
||||
required this.code,
|
||||
required this.deviceId});
|
||||
const SpotLight({super.key, required this.value, required this.code, required this.deviceId});
|
||||
|
||||
final bool value;
|
||||
final String code;
|
||||
@ -26,7 +23,7 @@ class SpotLight extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
ClipOval(
|
||||
child: ColoredBox(
|
||||
child: Container(
|
||||
color: ColorsManager.whiteColors,
|
||||
child: SvgPicture.asset(
|
||||
Assets.lightPulp,
|
||||
@ -40,7 +37,7 @@ class SpotLight extends StatelessWidget {
|
||||
width: 35,
|
||||
child: CupertinoSwitch(
|
||||
value: value,
|
||||
activeTrackColor: ColorsManager.dialogBlueTitle,
|
||||
activeColor: ColorsManager.dialogBlueTitle,
|
||||
onChanged: (newValue) {
|
||||
context.read<LivingRoomBloc>().add(
|
||||
LivingRoomControl(
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_svg/svg.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/bloc/living_room_bloc.dart';
|
||||
@ -6,11 +7,7 @@ import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
|
||||
class WallLight extends StatelessWidget {
|
||||
const WallLight(
|
||||
{super.key,
|
||||
required this.value,
|
||||
required this.code,
|
||||
required this.deviceId});
|
||||
const WallLight({super.key, required this.value, required this.code, required this.deviceId});
|
||||
|
||||
final bool value;
|
||||
final String code;
|
||||
@ -26,7 +23,7 @@ class WallLight extends StatelessWidget {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
ClipOval(
|
||||
child: ColoredBox(
|
||||
child: Container(
|
||||
color: ColorsManager.whiteColors,
|
||||
child: SvgPicture.asset(
|
||||
Assets.lightPulp,
|
||||
@ -40,7 +37,7 @@ class WallLight extends StatelessWidget {
|
||||
width: 35,
|
||||
child: CupertinoSwitch(
|
||||
value: value,
|
||||
activeTrackColor: ColorsManager.dialogBlueTitle,
|
||||
activeColor: ColorsManager.dialogBlueTitle,
|
||||
onChanged: (newValue) {
|
||||
context.read<LivingRoomBloc>().add(
|
||||
LivingRoomControl(
|
||||
|
||||
Reference in New Issue
Block a user