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!;
}
+2 -2
View File
@@ -45,7 +45,7 @@ class MyItemProvider extends ChangeNotifier {
myItems = [];
searchBoxValue = value;
originalMyItems!.forEach((result) {
if (result.id.toString().contains(searchBoxValue)) {
if (result.udi.toString().contains(searchBoxValue)) {
myItems!.add(result);
}
});
@@ -56,7 +56,7 @@ class MyItemProvider extends ChangeNotifier {
hospitalItems = [];
searchBoxValue = value;
originalHospitalItems!.forEach((result) {
if (result.id.toString().contains(searchBoxValue)) {
if (result.udi.toString().contains(searchBoxValue)) {
hospitalItems!.add(result);
}
});
+4 -2
View File
@@ -312,8 +312,10 @@ class PackageProvider extends ChangeNotifier {
var data = json.decode(response.body)['data'];
List<String> itemsList = [];
for (var item in data['items']) {
itemsList
.add("${item['name']} - ${item['udi'] != null ? item['udi'] : ''}");
// itemsList
// .add("${item['name']} - ${item['udi'] != null ? item['udi'] : ''}");
itemsList
.add("${item['id']} ${item['name']}");
}
print(data);
result = PackageDetailObject(