deconstruct method

(Iterable<T1>, Iterable<T2>, Iterable<T3>, Iterable<T4>, Iterable<T5>, Iterable<T6>, Iterable<T7>) deconstruct()

Takes this iterable of records and deconstructs it into a record of iterables.

The returned record will contain iterables containing each individual field of the record, returned in the same order as the fields themselves.

Implementation

(
  Iterable<T1>,
  Iterable<T2>,
  Iterable<T3>,
  Iterable<T4>,
  Iterable<T5>,
  Iterable<T6>,
  Iterable<T7>,
) deconstruct() {
  final list1 = <T1>[];
  final list2 = <T2>[];
  final list3 = <T3>[];
  final list4 = <T4>[];
  final list5 = <T5>[];
  final list6 = <T6>[];
  final list7 = <T7>[];

  for (final record in this) {
    list1.add(record.$1);
    list2.add(record.$2);
    list3.add(record.$3);
    list4.add(record.$4);
    list5.add(record.$5);
    list6.add(record.$6);
    list7.add(record.$7);
  }

  return (list1, list2, list3, list4, list5, list6, list7);
}