orEmpty property

List<T> orEmpty

Creates empty List if this nullable List is null, otherwise returns this List.

Implementation

List<T> get orEmpty => this ?? [];