mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-11 07:38:05 +00:00
fix real time garage door and add flush sensor to routines
This commit is contained in:
@ -17,7 +17,16 @@ class _RoutineDevicesState extends State<RoutineDevices> {
|
||||
context.read<RoutineBloc>().add(FetchDevicesInRoutine());
|
||||
}
|
||||
|
||||
static const _allowedProductTypes = {'AC', '1G', '2G', '3G', 'WPS', 'GW', 'CPS'};
|
||||
static const _allowedProductTypes = {
|
||||
'AC',
|
||||
'1G',
|
||||
'2G',
|
||||
'3G',
|
||||
'WPS',
|
||||
'GW',
|
||||
'CPS',
|
||||
'NCPS'
|
||||
};
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -34,7 +43,8 @@ class _RoutineDevicesState extends State<RoutineDevices> {
|
||||
});
|
||||
|
||||
final deviceList = state.devices
|
||||
.where((device) => _allowedProductTypes.contains(device.productType))
|
||||
.where(
|
||||
(device) => _allowedProductTypes.contains(device.productType))
|
||||
.toList();
|
||||
|
||||
return Wrap(
|
||||
@ -51,12 +61,16 @@ class _RoutineDevicesState extends State<RoutineDevices> {
|
||||
'productType': device.productType,
|
||||
'functions': device.functions,
|
||||
'uniqueCustomId': '',
|
||||
'tag': device.deviceTags!.isNotEmpty ? device.deviceTags![0].name : '',
|
||||
'tag': device.deviceTags!.isNotEmpty
|
||||
? device.deviceTags![0].name
|
||||
: '',
|
||||
'subSpace': device.deviceSubSpace?.subspaceName ?? '',
|
||||
};
|
||||
|
||||
if (state.searchText != null && state.searchText!.isNotEmpty) {
|
||||
return device.name!.toLowerCase().contains(state.searchText!.toLowerCase())
|
||||
return device.name!
|
||||
.toLowerCase()
|
||||
.contains(state.searchText!.toLowerCase())
|
||||
? DraggableCard(
|
||||
imagePath: deviceData['imagePath'] as String,
|
||||
title: deviceData['title'] as String,
|
||||
|
Reference in New Issue
Block a user