Skip to content

Overview

CherryPick is a lightweight, modular dependency injection toolkit for Dart and Flutter. You describe how to build your services in modules, install the modules into a scope, and resolve dependencies from that scope — synchronously or asynchronously, by type or by name. Scopes form a tree, so features and screens can get their own isolated dependencies and release them deterministically.

CherryPick works in pure Dart (CLI, server) and in Flutter apps, and you can wire it by hand or let cherrypick_generator write the wiring from annotations.

Scopes and composition

Bindings and resolution

Reliability and tooling

Package Purpose
cherrypick Runtime DI core: scopes, modules, bindings
cherrypick_flutter CherryPickProvider for the widget tree
cherrypick_annotations + cherrypick_generator Annotation-driven code generation
talker_cherrypick_logger DI event logging via Talker
cherrypick_lint Analyzer plugin for the IDE and dart analyze

More details and links are in Packages & Resources.

  1. Install the packages.
  2. Follow the Quick Start to build your first module and scope.
  3. Read the Core Concepts once the basics click.