orEmpty method
The list, or an empty one when null. for (final e in maybeList.orEmpty()) …
Implementation
List<T> orEmpty() => this?.toList() ?? <T>[];
The list, or an empty one when null. for (final e in maybeList.orEmpty()) …
List<T> orEmpty() => this?.toList() ?? <T>[];