mapAndRemoveEmpty<TCast> method

List<TCast> mapAndRemoveEmpty<TCast>(
  1. TCast? callback(
    1. T item
    )
)

After replacing the data in the list, delete the null.

callback: Callback function used in map.

Implementation

List<TCast> mapAndRemoveEmpty<TCast>(TCast? Function(T item) callback) {
  return map<TCast?>(callback).removeEmpty();
}