mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
push door lock and living room batch design
This commit is contained in:
@ -1,10 +1,4 @@
|
||||
<svg width="17" height="22" viewBox="0 0 17 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.771 11.6328H8.13623L7.81885 11L8.13623 10.3672H8.771V11.6328Z" fill="#292827"/>
|
||||
<path d="M7.50146 10.3672H8.13623V11.6328H7.50146V10.3672Z" fill="#464443"/>
|
||||
<path d="M4.8042 10.3672H6.07373V11.6328H4.8042V10.3672Z" fill="#464443"/>
|
||||
<path d="M10.1987 10.3672H11.4683V11.6328H10.1987V10.3672Z" fill="#292827"/>
|
||||
<path d="M8.13626 2.88879C3.64275 2.88879 0 6.52029 0 11C0 13.0387 0.754651 14.9015 2.00036 16.3265L3.9143 14.4184C3.15343 13.4856 2.69708 12.296 2.69708 11C2.69708 8.00525 5.13225 5.57757 8.13621 5.57757H8.8105V2.88879H8.13626Z" fill="#30BBEC"/>
|
||||
<path d="M14.2725 5.67358L12.3586 7.58168C13.1195 8.51449 13.5758 9.70409 13.5758 11.0001C13.5758 13.9949 11.1407 16.4225 8.13669 16.4225H7.4624V19.1113H8.13665C12.6302 19.1113 16.2729 15.4798 16.2729 11.0001C16.2729 8.96142 15.5183 7.09859 14.2725 5.67358Z" fill="#1F8DCD"/>
|
||||
<path d="M8.13623 0.199951V8.26637L12.1819 4.23316L8.13623 0.199951Z" fill="#16A5D9"/>
|
||||
<path d="M8.13648 21.8V13.7336L4.09082 17.7668L8.13648 21.8Z" fill="#16A5D9"/>
|
||||
<svg width="35" height="30" viewBox="0 0 35 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M27.4702 3.86642L24.351 7.51614C22.56 5.82834 20.1489 4.79201 17.5 4.79201C11.9882 4.79201 7.50309 9.27708 7.50309 14.7889C7.50309 15.0111 7.5113 15.2319 7.52565 15.4506H9.73845C10.4774 15.4506 10.8725 16.3209 10.3872 16.8773L8.47038 19.0757L5.30055 22.7125L4.41734 21.6994L0.213911 16.8773C-0.272125 16.3209 0.123677 15.4506 0.862644 15.4506H2.72613C2.71656 15.2312 2.71109 15.0104 2.71109 14.7889C2.71109 10.8384 4.24918 7.12444 7.04235 4.33126C9.83552 1.53809 13.5495 0 17.5 0C21.2249 0 24.7393 1.36856 27.4702 3.86642Z" fill="#619CED"/>
|
||||
<path d="M34.1379 15.491H32.273C32.1021 19.1776 30.5852 22.6188 27.9582 25.2466C25.165 28.0397 21.451 29.5778 17.5005 29.5778C14.1003 29.5778 10.8758 28.4376 8.26172 26.3383L11.3817 22.6886C13.0742 24.0024 15.1975 24.7858 17.5005 24.7858C22.7765 24.7858 27.1105 20.6767 27.4721 15.491H25.2621C24.5231 15.491 24.128 14.6214 24.6133 14.0643L26.9143 11.425L29.7 8.22914L31.6516 10.4679L34.7866 14.0643C35.2726 14.6214 34.8768 15.491 34.1379 15.491Z" fill="#619CED"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
8
assets/icons/firmware.svg
Normal file
8
assets/icons/firmware.svg
Normal file
@ -0,0 +1,8 @@
|
||||
<svg width="32" height="35" viewBox="0 0 32 35" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.20859 17.5333C2.20859 22.0298 4.44255 26.0045 7.86104 28.408C8.46346 28.8318 8.4955 29.7117 7.91685 30.1672L7.90056 30.18C7.52272 30.4775 6.99293 30.4973 6.59933 30.2209C2.6086 27.4182 0 22.7802 0 17.5333C0 9.02288 7.04447 2.11406 15.5378 2.04143V4.25055C8.26345 4.32265 2.20859 10.2421 2.20859 17.5333Z" fill="#1ED688"/>
|
||||
<path d="M15.9433 0.065948L20.0021 2.84224C20.2195 2.99097 20.2195 3.31167 20.0021 3.46041L15.9433 6.2367C15.6947 6.4068 15.3574 6.22869 15.3574 5.92775V0.375166C15.3574 0.0739588 15.6947 -0.103882 15.9433 0.065948Z" fill="#1AB975"/>
|
||||
<path d="M29.0795 17.4666C29.0795 12.9701 26.8453 8.99537 23.4268 6.59185C22.8243 6.16808 22.7923 5.28822 23.371 4.83267L23.3872 4.81985C23.7651 4.52238 24.2949 4.50262 24.6885 4.779C28.6795 7.58172 31.2878 12.2197 31.2878 17.4666C31.2878 25.977 24.2553 32.8858 15.7617 32.9585V30.7493C23.0361 30.6772 29.0795 24.758 29.0795 17.4666Z" fill="#1ED688"/>
|
||||
<path d="M15.3449 34.9339L11.2861 32.1576C11.0687 32.0089 11.0687 31.6882 11.2861 31.5395L15.3449 28.7632C15.5932 28.5931 15.9308 28.7712 15.9308 29.0721V34.6247C15.9308 34.9259 15.5932 35.104 15.3449 34.9339Z" fill="#1AB975"/>
|
||||
<path d="M22.5325 15.7787L15.884 21.2923L14.2079 22.6824C13.813 23.0095 13.3131 23.1871 12.8047 23.1871C12.72 23.1871 12.6354 23.1823 12.5499 23.1724C11.9568 23.1027 11.411 22.7882 11.053 22.3099L8.46759 18.8637C7.88387 18.0853 8.04168 16.9803 8.82034 16.3955C9.59953 15.8118 10.7045 15.9696 11.2885 16.7483L13.0338 19.0754L13.0479 19.0639L20.2822 13.0643C21.0318 12.4432 22.1432 12.5468 22.7645 13.2964C23.3859 14.0459 23.282 15.1573 22.5325 15.7787Z" fill="#1ED688"/>
|
||||
<path d="M22.5334 15.7787L15.8849 21.2923C14.7976 20.7494 13.8414 19.9991 13.0488 19.0639L20.2832 13.0643C21.0327 12.4432 22.1441 12.5468 22.7654 13.2964C23.3868 14.0459 23.2829 15.1573 22.5334 15.7787Z" fill="#35E298"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
@ -86,8 +86,10 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
setState(() {
|
||||
_selectAll = value ?? false;
|
||||
_selected = List<bool>.filled(widget.data.length, _selectAll);
|
||||
if (widget.selectAll != null) {
|
||||
widget.selectAll!(_selectAll);
|
||||
for (int i = 0; i < widget.data.length; i++) {
|
||||
if (widget.onRowSelected != null) {
|
||||
widget.onRowSelected!(i, _selectAll, widget.data[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -185,8 +187,7 @@ class _DynamicTableState extends State<DynamicTable> {
|
||||
),
|
||||
),
|
||||
child: Checkbox(
|
||||
value: widget.data.isNotEmpty &&
|
||||
_selected.every((element) => element == true),
|
||||
value: _selectAll,
|
||||
onChanged: widget.withSelectAll && widget.data.isNotEmpty
|
||||
? _toggleSelectAll
|
||||
: null,
|
||||
|
@ -115,17 +115,8 @@ class DeviceManagementBloc
|
||||
|
||||
List<AllDevicesModel> clonedSelectedDevices = List.from(_selectedDevices);
|
||||
|
||||
bool isControlButtonEnabled = false;
|
||||
|
||||
if (clonedSelectedDevices.length == 1) {
|
||||
isControlButtonEnabled = true;
|
||||
} else if (clonedSelectedDevices.length > 1) {
|
||||
|
||||
final productTypes =
|
||||
clonedSelectedDevices.map((device) => device.productType).toSet();
|
||||
isControlButtonEnabled = productTypes.length ==
|
||||
1;
|
||||
}
|
||||
bool isControlButtonEnabled =
|
||||
_checkIfControlButtonEnabled(clonedSelectedDevices);
|
||||
|
||||
if (state is DeviceManagementLoaded) {
|
||||
emit(DeviceManagementLoaded(
|
||||
@ -136,7 +127,7 @@ class DeviceManagementBloc
|
||||
lowBatteryCount: _lowBatteryCount,
|
||||
selectedDevice:
|
||||
clonedSelectedDevices.isNotEmpty ? clonedSelectedDevices : null,
|
||||
isControlButtonEnabled: isControlButtonEnabled,
|
||||
isControlButtonEnabled: isControlButtonEnabled,
|
||||
));
|
||||
} else if (state is DeviceManagementFiltered) {
|
||||
emit(DeviceManagementFiltered(
|
||||
@ -147,11 +138,22 @@ class DeviceManagementBloc
|
||||
lowBatteryCount: _lowBatteryCount,
|
||||
selectedDevice:
|
||||
clonedSelectedDevices.isNotEmpty ? clonedSelectedDevices : null,
|
||||
isControlButtonEnabled: isControlButtonEnabled,
|
||||
isControlButtonEnabled: isControlButtonEnabled,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
bool _checkIfControlButtonEnabled(List<AllDevicesModel> selectedDevices) {
|
||||
if (selectedDevices.length > 1) {
|
||||
final productTypes =
|
||||
selectedDevices.map((device) => device.productType).toSet();
|
||||
return productTypes.length == 1;
|
||||
} else if (selectedDevices.length == 1) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void _calculateDeviceCounts() {
|
||||
_onlineCount = _devices.where((device) => device.online == true).length;
|
||||
_offlineCount = _devices.where((device) => device.online == false).length;
|
||||
|
@ -4,7 +4,8 @@ import 'package:syncrow_web/pages/device_managment/ac/view/ac_device_control.dar
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/ceiling_sensor/view/ceiling_sensor_controls.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/curtain/view/curtain_status_view.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/door_lock/view/door_lock_status_view.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/door_lock/view/door_lock_batch_control_view.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/door_lock/view/door_lock_control_view.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/gateway/view/gateway_view.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/view/living_room_batch_controls.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/view/living_room_device_control.dart';
|
||||
@ -40,12 +41,30 @@ mixin RouteControlsBasedCode {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
3G: 2 occurrences
|
||||
1G: 1 occurrence
|
||||
2G: 1 occurrence
|
||||
GW: 2 occurrences
|
||||
DL: 2 occurrences
|
||||
WPS: 2 occurrences
|
||||
CPS: 2 occurrences
|
||||
AC: 3 occurrences
|
||||
CUR: 1 occurrence
|
||||
|
||||
|
||||
*/
|
||||
|
||||
Widget routeBatchControlsWidgets({required List<AllDevicesModel> devices}) {
|
||||
switch (devices.first.productType) {
|
||||
case '3G':
|
||||
case '1G':
|
||||
case '2G':
|
||||
return LivingRoomBatchControls(
|
||||
deviceIds: devices
|
||||
.where((e) => e.productType == '3G')
|
||||
.where((e) => (e.productType == '3G' ||
|
||||
e.productType == '1G' ||
|
||||
e.productType == '2G'))
|
||||
.map((e) => e.uuid!)
|
||||
.toList(),
|
||||
);
|
||||
@ -53,8 +72,12 @@ mixin RouteControlsBasedCode {
|
||||
// return GateWayControls(
|
||||
// gatewayId: device.first.uuid!,
|
||||
// );
|
||||
// case 'DL':
|
||||
// return DoorLockControls(device: device.first);
|
||||
case 'DL':
|
||||
return DoorLockBatchControlView(
|
||||
devicesIds: devices
|
||||
.where((e) => (e.productType == 'DL'))
|
||||
.map((e) => e.uuid!)
|
||||
.toList());
|
||||
// case 'WPS':
|
||||
// return WallSensorControls(device: device.first);
|
||||
// case 'CPS':
|
||||
|
@ -139,7 +139,7 @@ class DeviceManagementBody extends StatelessWidget with HelperResponsiveLayout {
|
||||
? const EdgeInsets.all(30)
|
||||
: const EdgeInsets.all(15),
|
||||
child: DynamicTable(
|
||||
withSelectAll: false,
|
||||
withSelectAll: true,
|
||||
cellDecoration: containerDecoration,
|
||||
onRowSelected: (index, isSelected, row) {
|
||||
final selectedDevice = devicesToShow[index];
|
||||
|
@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/shared/batch_control/factory_reset.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/shared/batch_control/firmware_update.dart';
|
||||
import 'package:syncrow_web/utils/helpers/responsice_layout_helper/responsive_layout_helper.dart';
|
||||
|
||||
class DoorLockBatchControlView extends StatelessWidget
|
||||
with HelperResponsiveLayout {
|
||||
const DoorLockBatchControlView({super.key, required this.devicesIds});
|
||||
|
||||
final List<String> devicesIds;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isExtraLarge = isExtraLargeScreenSize(context);
|
||||
final isLarge = isLargeScreenSize(context);
|
||||
final isMedium = isMediumScreenSize(context);
|
||||
return SizedBox(
|
||||
child: GridView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 50),
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: isLarge || isExtraLarge || isMedium ? 2 : 1,
|
||||
mainAxisExtent: 140,
|
||||
crossAxisSpacing: 12,
|
||||
mainAxisSpacing: 12,
|
||||
),
|
||||
children: [
|
||||
FirmwareUpdateWidget(
|
||||
deviceId: devicesIds.first,
|
||||
version: 12,
|
||||
),
|
||||
FactoryResetWidget(deviceId: devicesIds.first),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/shared/device_controls_container.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||
|
||||
class FactoryResetWidget extends StatelessWidget {
|
||||
const FactoryResetWidget({super.key, required String deviceId});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DeviceControlsContainer(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ClipOval(
|
||||
child: Container(
|
||||
color: ColorsManager.whiteColors,
|
||||
height: 60,
|
||||
width: 60,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: SvgPicture.asset(
|
||||
Assets.factoryReset,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
)),
|
||||
Text(
|
||||
'Factory Reset',
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/shared/device_controls_container.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||
|
||||
class FirmwareUpdateWidget extends StatelessWidget {
|
||||
const FirmwareUpdateWidget(
|
||||
{super.key, required String deviceId, required int version});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DeviceControlsContainer(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
ClipOval(
|
||||
child: Container(
|
||||
color: ColorsManager.whiteColors,
|
||||
height: 60,
|
||||
width: 60,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: SvgPicture.asset(
|
||||
Assets.firmware,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
)),
|
||||
Text(
|
||||
'Firmware Update',
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -22,8 +22,8 @@ class DeviceBatchControlDialog extends StatelessWidget
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
),
|
||||
child: SizedBox(
|
||||
width: 798,
|
||||
height: context.screenHeight * 0.7,
|
||||
width: devices.length < 3 ? 500 : 798,
|
||||
// height: context.screenHeight * 0.7,
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
@ -34,13 +34,25 @@ class DeviceBatchControlDialog extends StatelessWidget
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
const SizedBox(),
|
||||
Text(
|
||||
devices.first.categoryName ?? 'Device Control',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 22,
|
||||
color: ColorsManager.dialogBlueTitle,
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
devices.first.categoryName ?? 'Device Control',
|
||||
style: context.textTheme.titleLarge!.copyWith(
|
||||
color: ColorsManager.dialogBlueTitle,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
height: 8,
|
||||
),
|
||||
Text(
|
||||
"Batch Control",
|
||||
style: context.textTheme.bodySmall!.copyWith(
|
||||
color: ColorsManager.dialogBlueTitle,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Container(
|
||||
width: 25,
|
||||
@ -66,6 +78,7 @@ class DeviceBatchControlDialog extends StatelessWidget
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
const SizedBox(height: 20),
|
||||
//// BUILD DEVICE CONTROLS
|
||||
///
|
||||
|
@ -1,7 +1,6 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/helper/route_controls_based_code.dart';
|
||||
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||
@ -22,7 +21,7 @@ class DeviceControlDialog extends StatelessWidget with RouteControlsBasedCode {
|
||||
),
|
||||
child: SizedBox(
|
||||
width: 798,
|
||||
height: context.screenHeight * 0.7,
|
||||
// height: context.screenHeight * 0.7,
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
|
@ -1,5 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/shared/batch_control/factory_reset.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/shared/batch_control/firmware_update.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/bloc/living_room_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/models/living_room_model.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/widgets/living_toggle_widget.dart';
|
||||
@ -60,6 +62,11 @@ class LivingRoomBatchControls extends StatelessWidget
|
||||
deviceId: deviceIds.first,
|
||||
label: 'Wall Light',
|
||||
),
|
||||
FirmwareUpdateWidget(
|
||||
deviceId: deviceIds.first,
|
||||
version: 12,
|
||||
),
|
||||
FactoryResetWidget(deviceId: deviceIds.first),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
@ -5,6 +5,7 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/three_gang_switch/bloc/living_room_bloc.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
import 'package:syncrow_web/utils/extension/build_context_x.dart';
|
||||
|
||||
class ToggleWidget extends StatelessWidget {
|
||||
final bool value;
|
||||
@ -29,12 +30,13 @@ class ToggleWidget extends StatelessWidget {
|
||||
border: Border.all(color: ColorsManager.boxDivider),
|
||||
),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ClipOval(
|
||||
child: Container(
|
||||
@ -46,31 +48,31 @@ class ToggleWidget extends StatelessWidget {
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
width: 35,
|
||||
child: CupertinoSwitch(
|
||||
value: value,
|
||||
activeColor: ColorsManager.dialogBlueTitle,
|
||||
onChanged: (newValue) {
|
||||
context.read<LivingRoomBloc>().add(
|
||||
LivingRoomControl(
|
||||
deviceId: deviceId,
|
||||
code: code,
|
||||
value: newValue,
|
||||
),
|
||||
);
|
||||
},
|
||||
Text(
|
||||
label,
|
||||
style: context.textTheme.titleMedium!.copyWith(
|
||||
fontWeight: FontWeight.w400,
|
||||
color: ColorsManager.blackColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
Container(
|
||||
height: 20,
|
||||
width: 35,
|
||||
padding: const EdgeInsets.only(right: 16, top: 10),
|
||||
child: CupertinoSwitch(
|
||||
value: value,
|
||||
activeColor: ColorsManager.dialogBlueTitle,
|
||||
onChanged: (newValue) {
|
||||
context.read<LivingRoomBloc>().add(
|
||||
LivingRoomControl(
|
||||
deviceId: deviceId,
|
||||
code: code,
|
||||
value: newValue,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -126,4 +126,5 @@ class Assets {
|
||||
static const String grid = "assets/images/grid.svg";
|
||||
static const String curtainIcon = "assets/images/curtain.svg";
|
||||
static const String unlock = 'assets/icons/unlock_ic.svg';
|
||||
static const String firmware = 'assets/icons/firmware.svg';
|
||||
}
|
||||
|
Reference in New Issue
Block a user