talira

built_collection

Immutable collections for Dart using the builder pattern

open sourceBSD-3-Clausefree

built_collection gives Dart immutable collections using the builder pattern: each core SDK collection is split into a mutable builder class for computation and an immutable "built" class for sharing without defensive copies. Built collections are comparable and hashable, use copy-on-write to avoid needless copying, and convert efficiently back to their SDK counterparts. It pairs with built_value for immutable values, and its source now lives in the dart-lang/build repository.

Problems it solves

  • share collections in Dart without copying them defensively
  • use immutable lists, sets and maps in a Flutter app
  • compare and hash collections by value in Dart

Features

  • immutable list, set, map and multimap classes with mutable builders
  • comparable and hashable collections
  • copy-on-write
  • efficient conversion to SDK collections

Alternatives

The same job

These do what built_collection does.

  1. Fast Immutable Collections Immutable lists, sets and maps for Dart that are as fast as mutable ones

Compare built_collection with the top 3