Injector class

Properties

hashCode → int
The hash code for this object. [...]
read-only, inherited
name → String
The name of this injector. [...]
final
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

bloc<T extends Bloc>(BlocFactoryFn<T> factoryFn, {String key, bool replaceOnConflict = false}) → void
blocWithParams<T extends Bloc>(BlocFactoryFnWithParamsFn<T> factoryFn, {String key, bool replaceOnConflict = false}) → void
dispose() → void
Disposes of the injector instance and removes it from the named collection of injectors
disposeBloc(Bloc bloc) → void
factory<T>(ObjectFactoryFn<T> factoryFn, {String key, bool replaceOnConflict = false}) → void
factoryWithParams<T>(ObjectFactoryWithParamsFn<T> factoryFn, {String key, bool replaceOnConflict = false}) → void
get<T>({String key, Map<String, dynamic> additionalParameters}) → T
getBloc<T extends Bloc>(BuildContext context) → T
injectBloc<T extends Bloc>({String key, Map<String, dynamic> additionalParameters}) → T
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
single<T>(ObjectFactoryFn<T> factoryFn, {String key, bool replaceOnConflict = false}) → void
singleWithParams<T>(ObjectFactoryWithParamsFn<T> factoryFn, {String key, bool replaceOnConflict = false}) → void
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator. [...]
inherited

Static Methods

getInjector([String name = "default"]) Injector