Installation
Add CherryPick to your pubspec.yaml. Include cherrypick_annotations and
cherrypick_generator only if you plan to use annotations and code generation.
dependencies: cherrypick: ^4.0.0 cherrypick_annotations: ^4.0.0
dev_dependencies: build_runner: ^2.4.0 cherrypick_generator: ^4.0.0dependencies: cherrypick: ^4.0.0 cherrypick_flutter: ^4.0.0 cherrypick_annotations: ^4.0.0
dev_dependencies: build_runner: ^2.4.0 cherrypick_generator: ^4.0.0Fetch the packages:
dart pub get # or: flutter pub getIf you use annotations, run the generator whenever your DI code changes:
dart run build_runner build --delete-conflicting-outputsImport the core library where you configure dependencies:
import 'package:cherrypick/cherrypick.dart';Next, head to Getting Started.