Skip to content

Commit

Permalink
Fixed missing usage of ServiceFactory<T>
Browse files Browse the repository at this point in the history
  • Loading branch information
devtronic committed Feb 2, 2020
1 parent ecd59ad commit 937f86d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.0.2
- Fixed missing usage of ServiceFactory<T>

## 1.0.1

- pub.dev suggestions implemented
Expand Down
6 changes: 3 additions & 3 deletions lib/dependency_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ class DependencyContainer implements DependencyContainerInterface {

@override
void registerWithDependencies<T>(
Function serviceFactory,
ServiceFactory<T> serviceFactory,
List<Type> dependencies,
) {
_factories[T] = _ServiceWithDependencies(serviceFactory, dependencies);
}

@override
void registerInterfaceWithDependencies<TB, T extends TB>(
Function serviceFactory,
ServiceFactory<T> serviceFactory,
List<Type> dependencies,
) {
_factories[TB] = _ServiceWithDependencies(serviceFactory, dependencies);
Expand Down Expand Up @@ -168,7 +168,7 @@ class DependencyContainer implements DependencyContainerInterface {
}

class _ServiceWithDependencies<T> {
final Function serviceFactory;
final ServiceFactory<T> serviceFactory;
final List<Type> dependencies;

_ServiceWithDependencies(
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: flutter_catalyst
version: 1.0.1
version: 1.0.2
description: A dependency injection container which also supports autowiring of services.
homepage: https://github.com/mintware-de/flutter_catalyst
environment:
Expand Down

0 comments on commit 937f86d

Please sign in to comment.