ifEmpty method

List<T> ifEmpty(
  1. List<T> value
)

Returns this List if it's not empty, otherwise returns value.

Implementation

List<T> ifEmpty(List<T> value) => isEmpty ? value : this;