record_iterable_utils 0.1.0 copy "record_iterable_utils: ^0.1.0" to clipboard
record_iterable_utils: ^0.1.0 copied to clipboard

A Dart package providing extension methods and utility functions for working with iterable records

example/record_iterable_utils.dart

import 'package:record_iterable_utils/record_iterable_utils.dart';

void main() {
  final students = [('Alice', 20), ('Bob', 22), ('Charlie', 19), ('David', 21)];

  // Map records to a string representation
  final mappedStudents =
      students.mapRecord((name, age) => '$name is $age years old');
  print(mappedStudents);
  // Output: (Alice is 20 years old, Bob is 22 years old, Charlie is 19 years old, David is 21 years old)

  // Filter records based on age
  final filteredStudents = students.whereRecord((name, age) => age >= 21);
  print(filteredStudents);
  // Output: ((Bob, 22), (David, 21))
}
1
likes
150
pub points
35%
popularity

Publisher

verified publisherk9i.app

A Dart package providing extension methods and utility functions for working with iterable records

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

More

Packages that depend on record_iterable_utils