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

outdated

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';

class Foo {
  final int bar;
  const Foo(this.bar);
}

void main() {
  final list = [Foo(1), Foo(2), Foo(3), Foo(2)];

  final contains2 = list.countWhere((element) => element.bar == 2);
  final contains4 = list.countWhere((element) => element.bar == 4);

  print('Count of foo with bar = 2: $contains2');
  print('Count of foo with bar = 4: $contains4');
  // > Contains foo with bar = 2: true
  // > Contains foo with bar = 4: false
}
39
likes
0
pub points
88%
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

License

unknown (LICENSE)

Dependencies

collection, quiver

More

Packages that depend on list_ext