deleteItem method
Implementation
@override
DocumentModel deleteItem(DocumentModel model, DocumentItemModel deleteItem) {
var newItems = <DocumentItemModel>[];
if (model.images != null) {
for (var item in model.images!) {
if (item != deleteItem) {
newItems.add(item);
}
}
}
var newModel = model.copyWith(images: newItems);
return newModel;
}