| LCOV - code coverage report | ||||||||||||||||||||||
|
||||||||||||||||||||||
Line data Source code 1 : extension GroupBy<T, E> on List<E> { 2 0 : List<List<E>> groupBy(T Function(E el) selector) { 3 0 : Map<T, List<E>> map = {}; 4 0 : for (E el in this) { 5 0 : if (map[selector(el)] == null) { 6 0 : map[selector(el)] = [el]; 7 : continue; 8 : } 9 0 : map[selector(el)]!.add(el); 10 : } 11 0 : return map.entries.map((el) => el.value).toList(); 12 : } 13 : } |
| Generated by: LCOV version 2.3-1 |