A simple compile-time dependency injection library for Dart and Flutter
351
stars
51
forks
source link
feature(scoped-parent): implemented scoped container that inherit a parent container's registrations (final implementation). #101
Closed
gbtb16 closed 8 months ago
Description
The idea behind this PR is to continue what was implemented in the PR by @ruicraveiro:
What has changed from the original PR?
Added comments to
KiwiContainer.scoped
section including an explanation of what the parent is used for.Used Map literal
<K, V>{}
to create_namedProviders
, as indicated in the Dart documentation instead ofMap<K, V>()
.Implemented unit tests made by @ruicraveiro, and improved to make it more verbose.
Changed where
DartVader
was toDarthVader
in tests to follow how it is correctly written in fiction. (funny change) 😄All 20 tests are passed correctly.