simple_service_locator 0.1.4
simple_service_locator: ^0.1.4 copied to clipboard
Lightweight hierarchical dependency injection for Flutter with scoped lifecycles and tagged lookups.
0.1.4 #
Added #
- Widget tests covering scope provision, scope consumption, and missing scope errors.
Changed #
- Updated public library docs to reference
ScopeProviderStateandScopeConsumerState.
Breaking Changes #
ScopedWidgetStatewas split intoScopeProviderStateandScopeConsumerState.- Update widget mixin usages and imports to the new names.
0.1.3 #
0.1.2 #
Added #
- Child-scope-only dependency lookup:
DiScope.findInChildren<T>({tag, exactTypeMatch, onMany})- throws
MultipleInstancesFoundExceptionwhen more than one child scope matches and noonManyresolver is provided
- Optional child-tree lookup on
find:DiScope.find<T>({..., searchDescendants: true, onMany})- keeps default behavior unchanged when omitted (
false)
- Scope discovery by local registrations:
DiScope.locateScopes<T>({tag, exactTypeMatch, includeSelf})DiScope.locateScopesByTag(tag, {includeSelf})
Changed #
- Removed internal
_rootScope()traversal and inlined duplicate scope checks againstRootScope. - Added regression tests for child lookup:
- successful resolution in nested descendants
- not-found behavior
- ambiguity details in
MultipleInstancesFoundException find(..., searchDescendants: true)and default non-descendant behavior
0.1.1 #
Added #
- Added publish-ready package example:
example/simple_service_locator_example.dart
- Expanded dartdoc coverage for public API:
- exception constructors
DiElementpublic fields
Changed #
- Improved
DiScope.verboseTreeparameter naming:- added
verboseInstances - kept
verboseInstacesfor backward compatibility
- added
0.1.0 #
Added #
- Regression test for abstraction-chain resolution:
- register as base contract
- resolve as intermediate contract
- resolve as concrete implementation
- Pub.dev-oriented README with practical setup and usage examples.
AGENTS.mdwith repository contribution/release notes for coding agents.
Changed #
- Package renamed to
simple_service_locator. - Primary public entrypoint is now
lib/simple_service_locator.dart. - Updated package imports in library sources and tests to:
package:simple_service_locator/simple_service_locator.dart
- Fixed descendant lookup in
DiScope.find<T>()for aliased runtime registrations. - Improved
pubspec.yamlmetadata for pub.dev (description, links, topics). - Lint cleanup across source/tests.
Breaking Changes #
- Import path changed:
package:flutter_di/flutter_di.dart- to
package:simple_service_locator/simple_service_locator.dart
- Package dependency name changed:
flutter_di- to
simple_service_locator
0.0.1 #
- Initial release.