From feb489949ab75eebdd9587d209f9334b9f94d985 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Thu, 8 Nov 2018 11:54:14 -0500 Subject: [PATCH] default args --- angel_container/CHANGELOG.md | 6 ++++++ angel_container/lib/src/static/static.dart | 9 ++++----- angel_container/pubspec.yaml | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/angel_container/CHANGELOG.md b/angel_container/CHANGELOG.md index 134f0511..0ce1c643 100644 --- a/angel_container/CHANGELOG.md +++ b/angel_container/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.0.0-alpha.12 +* `StaticReflector` now defaults to empty arguments. + +# 1.0.0-alpha.11 +* Added `StaticReflector`. + # 1.0.0-alpha.10 * Added `Container.registerLazySingleton`. * Added named singleton support. diff --git a/angel_container/lib/src/static/static.dart b/angel_container/lib/src/static/static.dart index 8d66fc4e..0b380879 100644 --- a/angel_container/lib/src/static/static.dart +++ b/angel_container/lib/src/static/static.dart @@ -1,5 +1,4 @@ import 'package:angel_container/angel_container.dart'; -import 'package:meta/meta.dart'; /// A [Reflector] implementation that performs simple [Map] lookups. /// @@ -11,10 +10,10 @@ class StaticReflector implements Reflector { final Map instances; const StaticReflector( - {@required this.names, - @required this.types, - @required this.functions, - @required this.instances}); + {this.names: const {}, + this.types: const {}, + this.functions: const {}, + this.instances: const {}}); @override String getName(Symbol symbol) { diff --git a/angel_container/pubspec.yaml b/angel_container/pubspec.yaml index 20ec9cca..971e69d0 100644 --- a/angel_container/pubspec.yaml +++ b/angel_container/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_container -version: 1.0.0-alpha.11 +version: 1.0.0-alpha.12 author: Tobe O description: "A better IoC container and dependency injector for Angel, ultimately allowing Angel to be used without dart:mirrors." homepage: https://github.com/angel-dart/container.git