mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-12 08:18:54 +03:30
Fix barcode scanner bug in add package select item
This commit is contained in:
@@ -41,7 +41,15 @@ class PackageAddSaveButton extends StatelessWidget {
|
||||
}
|
||||
List<String> items = [];
|
||||
for (TextEditingController item in itemValues) {
|
||||
items.add(item.text);
|
||||
print(item.text);
|
||||
if (item.text.toString().contains(" ")) {
|
||||
packageProvider.filteredItems?.forEach((element) {
|
||||
if (element.udi_name.toString() == item.text.toString()) {
|
||||
items.add(element.id.toString());
|
||||
}
|
||||
});
|
||||
} else
|
||||
items.add(item.text);
|
||||
}
|
||||
items = items.toSet().toList();
|
||||
await Provider.of<PackageProvider>(context, listen: false)
|
||||
|
||||
Reference in New Issue
Block a user