mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
push add ac fucntions and handle doplicate adding to the then or if items
This commit is contained in:
@ -28,12 +28,14 @@ class RoutineDevices extends StatelessWidget {
|
||||
return Wrap(
|
||||
spacing: 10,
|
||||
runSpacing: 10,
|
||||
children: deviceList
|
||||
.map((device) => DraggableCard(
|
||||
imagePath: device.getDefaultIcon(device.productType),
|
||||
title: device.name ?? '',
|
||||
))
|
||||
.toList(),
|
||||
children: deviceList.asMap().entries.map((entry) {
|
||||
final index = entry.key;
|
||||
final device = entry.value;
|
||||
return DraggableCard(
|
||||
imagePath: device.getDefaultIcon(device.productType),
|
||||
title: device.name ?? '',
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
}
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
|
Reference in New Issue
Block a user