recollection 1.0.0

  • Installing
  • Versions
  • 51


Effective immutable collections for Dart.

API docs


Create immutable views around list with ListView. Recreate lists with ListBuilder.

var list = [1, 2, 3];

var view = ListView.of(list);

list = ListBuilder.from(list)

Same is possible with sets and maps.


SDK immutable collection constructors, like List.unmodifiable, copy whole collection using Iterator, which is slow and inefficient.

built_collection package contains immutable wrappers around SDK collections, however there is no way to create immutable wrapper around existing collection without recreating collection from scratch.

recollection package contains immutable collection wrappers that do not copy source collection by themselves. Also there are builders that can be used to create a copy of existing SDK collection with some changes. Those are valuable benefits for performance-sensitive scenarios.



  • Initial release

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  recollection: ^1.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:recollection/recollection.dart';
Version Uploaded Documentation Archive
1.0.0 Sep 24, 2018 Go to the documentation of recollection 1.0.0 Download recollection 1.0.0 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:recollection/recollection.dart.

Health suggestions

Format lib/src/list/list_builder.dart.

Run dartfmt to format lib/src/list/list_builder.dart.

Format lib/src/list/list_view.dart.

Run dartfmt to format lib/src/list/list_view.dart.

Format lib/src/map/map_builder.dart.

Run dartfmt to format lib/src/map/map_builder.dart.

Format lib/src/map/map_view.dart.

Run dartfmt to format lib/src/map/map_view.dart.

Format lib/src/set/set_view.dart.

Run dartfmt to format lib/src/set/set_view.dart.

Maintenance suggestions

The description is too short. (-20 points)

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use recollection.dart.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev <3.0.0
meta ^1.1.0 1.1.6