mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
push door lock
This commit is contained in:
@ -119,157 +119,4 @@ class DeviceControlDialog extends StatelessWidget with RouteControlsBasedCode {
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ////// changing here for devices controls ////
|
||||
// Widget _buildStatusControls(List<Status> statuses) {
|
||||
// return GridView.builder(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 40),
|
||||
// shrinkWrap: true,
|
||||
// physics: const NeverScrollableScrollPhysics(),
|
||||
// gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
// crossAxisCount: 3,
|
||||
// mainAxisExtent: 133,
|
||||
// crossAxisSpacing: 12,
|
||||
// mainAxisSpacing: 12,
|
||||
// ),
|
||||
// itemCount: statuses.length,
|
||||
// itemBuilder: (context, index) {
|
||||
// final status = statuses[index];
|
||||
|
||||
// return Container(
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(20),
|
||||
// color: ColorsManager.greyColor.withOpacity(0.2),
|
||||
// border: Border.all(color: ColorsManager.boxDivider),
|
||||
// ),
|
||||
// padding: const EdgeInsets.all(16),
|
||||
// child: _buildControlForStatus(status),
|
||||
// );
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
|
||||
// Widget _buildControlForStatus(Status status) {
|
||||
// switch (status.type) {
|
||||
// case OperationDialogType.onOff:
|
||||
// return Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// children: [
|
||||
// if (status.icon.isNotEmpty)
|
||||
// ClipOval(
|
||||
// child: Container(
|
||||
// color: ColorsManager.whiteColors,
|
||||
// child: SvgPicture.asset(
|
||||
// status.icon,
|
||||
// width: 60,
|
||||
// height: 60,
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// )),
|
||||
// SizedBox(
|
||||
// height: 20,
|
||||
// width: 35,
|
||||
// child: CupertinoSwitch(
|
||||
// value: status.value ?? false,
|
||||
// onChanged: (newValue) {
|
||||
// // Handle toggle change
|
||||
// },
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// const Spacer(),
|
||||
// Center(
|
||||
// child: Text(
|
||||
// status.name,
|
||||
// style: const TextStyle(
|
||||
// fontWeight: FontWeight.bold,
|
||||
// fontSize: 14,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// case OperationDialogType.countdown:
|
||||
// return Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Center(
|
||||
// child: Text(
|
||||
// status.name,
|
||||
// style: const TextStyle(
|
||||
// fontWeight: FontWeight.bold,
|
||||
// fontSize: 14,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// const Spacer(),
|
||||
// IncrementDecrementWidget(
|
||||
// value: status.value.toString(),
|
||||
// description: 'hr',
|
||||
// onIncrement: () {
|
||||
// // Handle increment
|
||||
// },
|
||||
// onDecrement: () {
|
||||
// // Handle decrement
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// case OperationDialogType.integerSteps:
|
||||
// return IncrementDecrementWidget(
|
||||
// value: status.value.toString(),
|
||||
// description: 'm',
|
||||
// onIncrement: () {
|
||||
// // Handle increment
|
||||
// },
|
||||
// onDecrement: () {
|
||||
// // Handle decrement
|
||||
// },
|
||||
// );
|
||||
// case OperationDialogType.listOfOptions:
|
||||
// return Wrap(
|
||||
// children: [
|
||||
// ...status.options!.map((e) => ClipOval(
|
||||
// child: SvgPicture.asset(
|
||||
// e.icon,
|
||||
// width: 40,
|
||||
// height: 40,
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// ))
|
||||
// ],
|
||||
// );
|
||||
|
||||
// default:
|
||||
// return Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// if (status.icon.isNotEmpty)
|
||||
// ClipOval(
|
||||
// child: Container(
|
||||
// color: ColorsManager.whiteColors,
|
||||
// child: SvgPicture.asset(
|
||||
// status.icon,
|
||||
// width: 60,
|
||||
// height: 60,
|
||||
// fit: BoxFit.cover,
|
||||
// ),
|
||||
// )),
|
||||
// const Spacer(),
|
||||
// Text(
|
||||
// status.value.toString(),
|
||||
// style: const TextStyle(
|
||||
// fontSize: 14,
|
||||
// color: Colors.black54,
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
Reference in New Issue
Block a user