orDefault method

  1. @useResult
List<T> orDefault(
  1. List<T> defaultValue
)

This list, or defaultValue if empty.

Implementation

@useResult
List<T> orDefault(List<T> defaultValue) => isEmpty ? defaultValue : this;