factory<S> static method
Bind<S>
factory<S>(
- InstanceBuilderCallback<
S> builder, { - bool autoRemove = true,
- bool assignId = true,
- String? tag,
Creates a binding with the specified controller factory. This is a more flexible way to create a binding, as it allows you to specify a custom factory function.
Implementation
static Bind<S> factory<S>(
InstanceBuilderCallback<S> builder, {
bool autoRemove = true,
bool assignId = true,
String? tag,
}) => _FactoryBind<S>(
init: () => builder(),
autoRemove: autoRemove,
assignId: assignId,
tag: tag,
);