tryMerge method
Tries to merge the iterables, returning null if it fails.
Implementation
Iterable<T>? tryMerge([
Iterable<T> Function(Iterable<T>?, Iterable<T>?)? merge,
]) {
try {
return reduce(merge ?? (a, b) => <T>[...a ?? [], ...b ?? []]);
} catch (_) {
return null;
}
}