flattenDeep<T> function
Implementation
Iterable<T> flattenDeep<T>(Iterable<Object?> list) sync* {
for (var element in list) {
if (element is! Iterable) {
yield element as T;
} else {
yield* flattenDeep(element);
}
}
}