diff --git a/CHANGELOG.md b/CHANGELOG.md index 66e99e8..19e8148 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +# 2.0.2 + +## Features + +- It is now possible to inject parameterized types by using `TypeLiteral`: + +```dart +import 'package:di/type_literal.dart'; + +class DependencyWithParameterizedMap { + Map map; + DependencyWithParameterizedMap(this.map); +} + +var injector = new ModuleInjector([moduleFactory() + ..bind(new TypeLiteral>().type, toValue: {1 : 'first', 2: 'second'}) + ..bind(DependencyWithParameterizedMap) +]); +``` +## Breaking Change + +- **annotations:** Users must now explicitly import `di/annotations.dart` to use `@injectable` + +## Fixes + +- Supports newer versions of barback, code transformers, and analyzer + # 2.0.1 ## Bug Fixes diff --git a/pubspec.yaml b/pubspec.yaml index 8d870c1..9e72b7b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: di -version: 2.0.1 +version: 2.0.2 authors: - Vojta Jina - Pavel Jbanov