ZenContainer class

Internal storage implementation for the DI system

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clear all instances and factories
findByTag<T>(String tag) → T?
Find an instance by tag
findByType<T>() → T?
Find an instance by type
findExact<T>(String? tag) → T?
Find an instance by exact type and tag
getAllFactoryKeys() List
Get all factory keys
getAllOfType<T>() List<T>
Get all instances of a specific type
getAllTypes() Set<Type>
Get all registered types
getFactory(dynamic key) Function?
Get a factory
getKey(Type type, String? tag) → dynamic
Get a key for associating factories and instances with types and tags
hasFactory(dynamic key) bool
Check if a factory exists for a key
hasInstance<T>(String? tag) bool
Check if an instance exists for a type and tag
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerFactory(dynamic key, Function factory) → void
Register a factory
registerInstance<T>(T instance, String? tag) → void
Register an instance
removeFactoriesByTag(String tag) → void
Remove factories by tag pattern
removeFactoriesByType(Type type) → void
Remove factories by type
removeFactory(dynamic key) bool
Remove a factory
removeInstance<T>(String? tag) bool
Remove an instance
removeInstanceByTypeAndTag(Type type, String? tag) bool
Remove an instance by its type and tag
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance ZenContainer
final