mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
SP-1366- Add Gateway Device Card to Devices Section.
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:syncrow_web/pages/device_managment/all_devices/models/devices_model.dart';
|
||||
import 'package:syncrow_web/pages/routines/bloc/routine_bloc/routine_bloc.dart';
|
||||
import 'package:syncrow_web/pages/routines/widgets/dragable_card.dart';
|
||||
|
||||
@ -32,14 +31,10 @@ class _RoutineDevicesState extends State<RoutineDevices> {
|
||||
}
|
||||
});
|
||||
|
||||
List<AllDevicesModel> deviceList = state.devices
|
||||
.where((device) =>
|
||||
device.productType == 'AC' ||
|
||||
device.productType == '1G' ||
|
||||
device.productType == '2G' ||
|
||||
device.productType == '3G' ||
|
||||
device.productType == 'WPS')
|
||||
.toList();
|
||||
final deviceList = state.devices.where((device) {
|
||||
const allowedProductTypes = {'AC', '1G', '2G', '3G', 'WPS', 'GW'};
|
||||
return allowedProductTypes.contains(device.productType);
|
||||
}).toList();
|
||||
|
||||
return Wrap(
|
||||
spacing: 10,
|
||||
@ -63,7 +58,7 @@ class _RoutineDevicesState extends State<RoutineDevices> {
|
||||
'uniqueCustomId': '',
|
||||
},
|
||||
)
|
||||
: Container();
|
||||
: const SizedBox.shrink();
|
||||
} else {
|
||||
return DraggableCard(
|
||||
imagePath: device.getDefaultIcon(device.productType),
|
||||
|
Reference in New Issue
Block a user