orEmpty method

List<T> orEmpty()

The list, or an empty one when null. for (final e in maybeList.orEmpty()) …

Implementation

List<T> orEmpty() => this?.toList() ?? <T>[];