Overview of Fast Immutable Collections (FIC)
masterFast Immutable Collections (FIC) is a Dart package providing high-performance immutable collection types. It is designed to be easier to use than built_collection (no manual mutable/immutable cycles required) and significantly faster than kt_dart by internally saving only the differences between collections rather than copying the entire structure.
Core Immutable Collections:
IList: An immutable list.ISet: An immutable set.IMap: An immutable map.IMapOfSets: An immutable map of sets (multimap).
Key Features:
- Lock/Unlock Extensions: Easily transform mutable collections to immutable ones (e.g.,
[1, 2].lock) and vice-versa. - Configuration: Global and local settings for equality, sorting, caching, and flushing.
- Value-Object Support: Optional deep equalities and cached
hashCodes. - Efficient Mutable Alternatives:
ListSet: An efficient, fixed-size mutable collection that acts as both an orderedSetand aList.ListMap: A mutable, fixed-size, ordered map with efficientListmethods likesortandshuffle.
- Native Extensions: Extensive extensions for native
List,Set,Map,Iterable,Iterator, and more (e.g.,[1, 2, 1].removeDuplicates()). - Const Support: Ability to create
constversions ofIList,ISet, andIMap.