list_ext 1.0.6 copy "list_ext: ^1.0.6" to clipboard
list_ext: ^1.0.6 copied to clipboard

Dart extension methods for Iterable and List. You can easily sum, count elements and many more.

example/main.dart

import 'package:list_ext/list_ext.dart';

void main() {
  final list = [1, 2, 5, 1];
  final sum = list.sum();
  print('Sum: $sum');

  final sumSquare = list.sumOf((v) => v * v);
  print('Sum of squares: $sumSquare');

  final count = list.countWhere((v) => v == 1);
  print('Count of 1: $count');
}
39
likes
160
pub points
87%
popularity

Publisher

verified publisherinnim.ru

Dart extension methods for Iterable and List. You can easily sum, count elements and many more.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

collection, quiver

More

Packages that depend on list_ext