bool addItem(ItemModel? item) { if (item == null) return false; int index = list.indexWhere((element) => element.id == item.id); if (index == -1) { list.add(item); return true; } return false; }