deconstruct method

(Iterable<T1>, Iterable<T2>) 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>) deconstruct() {
  final list1 = <T1>[];
  final list2 = <T2>[];

  for (final record in this) {
    list1.add(record.$1);
    list2.add(record.$2);
  }

  return (list1, list2);
}