# deleteItem method Null safety

1. @override

FaderModel deleteItem(

1. FaderModel model,
2. ListedItemModel deleteItem

)
override

## Implementation

    @override
    FaderModel deleteItem(FaderModel model, ListedItemModel deleteItem) {
      var newItems = <ListedItemModel>[];
      if (model.items != null) {
        for (var item in model.items!) {
          if (item != deleteItem) {
            newItems.add(item);
          }
        }
      }
      var newModel = model.copyWith(items: newItems);
      return newModel;
    }