flutter_multi_module_di library
Dependency injection container for dart.
Classes
- Binder
- Represents an object able to bind instances to the dependency injection container.
-
Binding<
T> - Represents an factory of singleton binding kept by an Injector.
- ChildInjectorStatefulWidget
- ChildInjectorWidget
- Configurer
- Represents an object able to configure bindings.
-
FactoryBinding<
T> - Represents a factory Binding
- Injector
- Dependency injection container.
- InjectorBuilder
- Builder to create Injector instances.
- InjectorMixin
- Utility to get the default injector from the registry.
- InjectorRegistry
- Dependency injection container static factory.
- InjectorWidget
- InheritedWidget containing an Injector.
- Installer
- Represents an object able to install dependencies in a Configurer.
-
InstanceBinding<
T> - Represents a Binding containing an instance.
-
LazySingletonBinding<
T> - Represents a lazy singleton Binding.
- Module
- A module to configure injection bindings.
- ModuleWidget
- Utility base Widget to set up bindings.
-
ObjectFactoryBinding<
T> - Represents a Binding containing an object factory.
-
Optional<
T> - Params
- Represents the optional params which can be passed to the Injector to build dependencies.
- ParamsBuilder
- Used to create a Params instance.
-
SingletonBinding<
T> - Represents a Singleton Binding
- WidgetModule
- WithInjectorWidget
- Widget able to build it's child from the Injector in the current BuildContext.
-
WithInstanceWidget<
T> - Widget able to build it's child from the instance found in the Injector in the current BuildContext.
Mixins
- InjectorWidgetMixin
- Utility mixin to easily use the injector in the InjectorWidget. This can be applied to State or to StatelessWidget classes.
Typedefs
- BindFunc = void Function(Binder binder)
- A function used to add the bindings to an Injector.
- InjectorWidgetBuilder = Widget Function(Injector injector)
- Builder to construct a Widget for the given Injector.
-
InstanceBuilder<
T> = Widget Function(T instance) -
Builder to construct a Widget for the given instance of type
T
-
ObjectFactory<
T> = T Function(Injector injector, Params? params) -
Represents a factory able to create instances of type
T
.
Exceptions / Errors
- InjectionException
- InjectorWidgetError
- Thrown when the InjectorWidget is not present.
- ParamException