deconstruct method

(Iterable<T1>, Iterable<T2>, Iterable<T3>, Iterable<T4>, Iterable<T5>) 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>)
    deconstruct() {
  final list1 = <T1>[];
  final list2 = <T2>[];
  final list3 = <T3>[];
  final list4 = <T4>[];
  final list5 = <T5>[];

  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);
  }

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