maybeAddToList<T> function
Adds add
to source
if both are not null.
Implementation
List<T>? maybeAddToList<T>(List<T>? source, List<T>? add) {
if (source == null) return source;
if (add == null) return source;
return [...source, ...add];
}