deconstruct method

(Iterable<T>) 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.

For iterables of single-field records, this effectively unwraps the field value from the record.

Implementation

(Iterable<T>,) deconstruct() {
  final list1 = <T>[];

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

  return (list1,);
}