flattenDeep function

List flattenDeep(
  1. Iterable list
)

Implementation

List flattenDeep(Iterable<dynamic> list) => [
      for (var element in list)
        if (element is! Iterable) element else ...flattenDeep(element),
    ];