Skip to content

Commit

Permalink
Add faster flattened extension
Browse files Browse the repository at this point in the history
  • Loading branch information
petrnymsa committed Apr 19, 2024
1 parent 52b112c commit 0a84258
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ extension IterableExtensions<T> on Iterable<T> {
return result.values;
}
}

extension IterableIterableExtension<T> on Iterable<Iterable<T>> {
List<T> get flattenedList => [for (final elements in this) ...elements];
}

0 comments on commit 0a84258

Please sign in to comment.