Fix destroy bug in list of items.dart

This commit is contained in:
hanie.khodkari
2025-06-03 18:00:50 +03:30
parent bb6dfa354f
commit 860a2fd0df
3 changed files with 57 additions and 23 deletions
+8
View File
@@ -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;