This commit is contained in:
unknown
2023-12-07 13:45:51 +03:30
parent a7f57688a7
commit 6464557956
67 changed files with 456 additions and 275 deletions
+12 -1
View File
@@ -238,7 +238,7 @@ class ItemProvider extends ChangeNotifier {
items = [];
searchBoxValue = value;
originalItems!.forEach((result) {
if (result.id.toString().contains(searchBoxValue)) {
if (result.udi.toString().contains(searchBoxValue)) {
items!.add(result);
}
});
@@ -312,10 +312,20 @@ class ItemProvider extends ChangeNotifier {
createdAt: '2019-09-18 10:02:03',
udi: 'null',
status: 0,
filePath: [],
);
}
var data = json.decode(response.body)['data'];
print(data);
List<String> mediaList = [];
if (data['filesPath'] != null) {
for (var file in data['filesPath']) {
mediaList.add(Url.showItemImage(file));
}
}
result = ItemDetailObject(
id: data['id'].toString(),
description: data['note'] != null ? data['note'] : '',
@@ -328,6 +338,7 @@ class ItemProvider extends ChangeNotifier {
createdAt: data['created_at'] != null ? data['created_at'] : '',
udi: data['udi'] != null ? data['udi'] : '',
status: data['status'],
filePath: mediaList,
);
return result!;
}