mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-12 08:28:56 +03:30
Fix destroy bug in list of items.dart
This commit is contained in:
@@ -202,6 +202,7 @@ class ItemProvider extends ChangeNotifier {
|
||||
'Authorization': User.token,
|
||||
});
|
||||
|
||||
print(response.statusCode);
|
||||
print(response.body);
|
||||
|
||||
if (response.statusCode == 200) {
|
||||
|
||||
@@ -71,6 +71,14 @@ class MyItemProvider extends ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<bool> removeItems(String id) async {
|
||||
myItems!.removeWhere((item) {
|
||||
return item.id.toString() == id;
|
||||
});
|
||||
notifyListeners();
|
||||
return true;
|
||||
}
|
||||
|
||||
// void searchHospitalItems(String value) {
|
||||
// hospitalItems = [];
|
||||
// searchBoxValue = value;
|
||||
|
||||
Reference in New Issue
Block a user