Introduction

CherryPick DI #

DI-container #

DI-container – this is library, when provide mechanism dependency injection.

Library’s features: #

DI container’s main features:

  • Initialization instance with name
  • Initialization instance when singleton
  • Separate container to scopes

Used to library #

Install library #

Run command:

For Dart project:

dart pub add cherrypick

For Flutter project:

flutter pub add cherrypick

Command added library cherrypick (and run command dart pub get in background) to pubspec.yaml:

dependencies:
  cherrypick: <version>

Import library #

Now you can use library:

import 'package:cherrypick/cherrypick.dart';