Skip to content
pubscout

list_ext

1.0.6, released 4 years ago by innim.ru

Dart extension methods for Iterable and List like sum, count, chunks, and sorting.

WASM-ready
$ flutter pub add list_ext
Source repository

What it does

Provides a collection of extension methods for Iterables and Lists in Dart. It adds utility operations for searching, math (sum, min, max, avg), transformations (chunks, intersperse, mapping with index), and safe element access.

AI-written summary of version 1.0.6, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need convenient extension methods for lists and iterables such as safe element access and math calculations.
  • You want to easily split lists into chunks or map elements with their indices.

Skip it when

  • You only need standard core Dart collection methods and want to minimize extra dependencies.

Strengths

  • Extends standard collections with widely used utility methods.
  • Includes safe element access and null-safety support.
  • Provides math and transformation helpers directly on Iterables.

Weaknesses

  • Relies on external packages like quiver and collection.
  • Adds methods to global Iterable and List types which might pollute namespace.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
2
import 'package:list_ext/list_ext.dart';

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

Alternatives

Packages that do the same job and could replace list_ext.

Works with

Packages commonly used together with list_ext: ones it builds on, ones built on it, and its own family.