FLUTTER ECOSYSTEM

built_collection

Immutable collections based on the SDK collections. Each SDK collection class is split into a new immutable collection class and a corresponding mutable builder class.

Latest version
5.1.1
30-day downloads
5M
Likes
343
Pub points
150

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Overview

Built Collection provides immutable versions of Dart's standard collections, ensuring data integrity by preventing unintended modifications. Each mutable SDK collection (like List, Map, Set) has a corresponding immutable variant and a mutable builder for constructing instances. This promotes functional programming practices and safer state management in applications. The package is particularly useful in reactive or stateful UI frameworks where immutability enhances predictability and debugging. It integrates seamlessly with Flutter and other Dart-based platforms.

Use cases
  • Immutable state management
  • Functional programming patterns
  • Safe data sharing across components
  • Reactive UI development
  • Preventing accidental mutations
  • State persistence in apps
Key features
  • Immutable collection classes
  • Mutable builder patterns
  • Type-safe construction
  • Seamless integration with Dart SDK
  • Support for all major platforms
  • Clean API design
Suitable for
  • Flutter developers seeking immutability
  • Apps requiring predictable state changes
  • Teams adopting functional programming
  • Large-scale applications with complex state logic
  • Developers using reactive state management
Considerations
  • Slight performance overhead from immutability
  • Learning curve for builder pattern
  • Not suitable for high-frequency mutation scenarios
  • Requires careful handling of collection updates
  • May increase memory usage due to copying
  • Best paired with state management solutions like Provider or Bloc
Supported platformsAndroidiOSWebmacOSWindowsLinux

Install package

flutter pub add built_collection

Categories

Source repository

Related projects

Rankings