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