mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 22:34:54 +00:00
117 lines
3.8 KiB
Dart
117 lines
3.8 KiB
Dart
part of "curtain_view.dart";
|
|
|
|
class CurtainButtons extends StatelessWidget {
|
|
const CurtainButtons({super.key, required this.curtain});
|
|
final DeviceModel curtain;
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
children: [
|
|
Stack(
|
|
alignment: Alignment.center,
|
|
children: [
|
|
DecoratedBox(
|
|
decoration: BoxDecoration(shape: BoxShape.circle, boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withOpacity(0.5),
|
|
spreadRadius: 1,
|
|
blurRadius: 5,
|
|
offset: const Offset(3, 3),
|
|
),
|
|
]),
|
|
child: InkWell(
|
|
overlayColor: MaterialStateProperty.all(Colors.transparent),
|
|
onTap: () {
|
|
DevicesCubit.get(context).openCurtain(curtain.productType!);
|
|
},
|
|
child: const SizedBox.square(
|
|
dimension: 60,
|
|
),
|
|
),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(right: 5, bottom: 5),
|
|
child: InkWell(
|
|
overlayColor: MaterialStateProperty.all(Colors.transparent),
|
|
onTap: () {
|
|
DevicesCubit.get(context).openCurtain(curtain.productType!);
|
|
},
|
|
child: SvgPicture.asset(
|
|
Assets.assetsIconsCurtainsIconOpenCurtain,
|
|
width: 110,
|
|
height: 110,
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
DecoratedBox(
|
|
decoration: BoxDecoration(shape: BoxShape.circle, boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withOpacity(0.5),
|
|
spreadRadius: 1,
|
|
blurRadius: 5,
|
|
offset: const Offset(3, 3),
|
|
),
|
|
]),
|
|
child: InkWell(
|
|
overlayColor: MaterialStateProperty.all(Colors.transparent),
|
|
onTap: () {
|
|
DevicesCubit.get(context).pauseCurtain();
|
|
},
|
|
child: Image.asset(
|
|
Assets.assetsImagesPause,
|
|
width: 60,
|
|
height: 60,
|
|
),
|
|
),
|
|
),
|
|
Stack(
|
|
alignment: Alignment.center,
|
|
children: [
|
|
DecoratedBox(
|
|
decoration: BoxDecoration(shape: BoxShape.circle, boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.grey.withOpacity(0.5),
|
|
spreadRadius: 1,
|
|
blurRadius: 5,
|
|
offset: const Offset(3, 3),
|
|
),
|
|
]),
|
|
child: const SizedBox.square(
|
|
dimension: 60,
|
|
),
|
|
// InkWell(
|
|
// overlayColor: MaterialStateProperty.all(Colors.transparent),
|
|
// onTap: () {
|
|
// DevicesCubit.get(context).closeCurtain(curtain.productType!);
|
|
// },
|
|
// child: SvgPicture.asset(
|
|
// Assets.assetsIconsCurtainsIconCloseCurtain,
|
|
// width: 60,
|
|
// height: 60,
|
|
// ),
|
|
// ),
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.only(right: 5, bottom: 5),
|
|
child: InkWell(
|
|
overlayColor: MaterialStateProperty.all(Colors.transparent),
|
|
onTap: () {
|
|
DevicesCubit.get(context).closeCurtain(curtain.productType!);
|
|
},
|
|
child: SvgPicture.asset(
|
|
Assets.assetsIconsCurtainsIconCloseCurtain,
|
|
width: 110,
|
|
height: 110,
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|