fast_immutable_collections
12.0.1, released 3 days ago by glasberg.dev
Fast immutable lists, sets, maps, and multimaps for Dart
What it does
Provides immutable collections like IList, ISet, IMap, and IMapOfSets that act like native mutable counterparts with high performance. Includes extension methods for native collections and sorting helpers.
AI-written summary of version 12.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want immutable data structures in your app without the high performance penalty of copying entire collections.
- You need convenient extension methods on native Dart lists, sets, maps, and iterables.
Skip it when
- You prefer standard mutable collections everywhere without enforcing immutability.
- You require deep identity behaviors that conflict with the package's equality configurations.
Strengths
- Significantly faster than many traditional immutable collection packages by saving structural differences.
- No manual mutable/immutable cycles required; easy locking via `.lock` extensions.
- Supports const instances for IList, ISet, and IMap.
Weaknesses
- Introduces custom collection types (IList, ISet, IMap) that require learning specific APIs.
- Changes in internal structure flushing can affect identity comparisons if not configured carefully.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
IList<String> ilist = [1, 2].lock;Alternatives
Packages that do the same job and could replace fast_immutable_collections.
- built_collection
Immutable collections based on SDK collections with builder pattern.
96Compare - ordered_set
Ordered Set that keeps elements sorted and allows duplicates by priority.
82Compare - more
A collection of utility extensions and specialized data structures for Dart.
90Compare - sortedmap
A map of objects which can be sorted and filtered on both their key and value.
82Compare
Works with
Packages commonly used together with fast_immutable_collections: ones it builds on, ones built on it, and its own family.
- async_reduxBuilt on fast_immutable_collectionsA Redux-inspired state management library for Flutter.
- werkbankBuilt on fast_immutable_collectionsA powerful tool that helps you develop, test, visualize, and organize your Flutter UI components.
- comprehensive_utilsBuilt on fast_immutable_collectionsA collection of performance-oriented tools, widgets, stream helpers, and numeric types.
- elementalBuilt on fast_immutable_collectionsA toolkit for writing software in Dart featuring an effect system and dependency management.