lazySingleton<T extends Object> static method
Bind<T>
lazySingleton<T extends Object>(
- T inject(
- Injector i
- bool export = false,
- void onDispose(
- T value
- dynamic selector(
- T value
Create single instance for request.
Implementation
static Bind<T> lazySingleton<T extends Object>(T Function(Injector i) inject,
{bool export = false,
void Function(T value)? onDispose,
dynamic Function(T value)? selector}) {
return Bind<T>(inject,
isSingleton: true,
isLazy: true,
export: export,
onDispose: onDispose,
selector: selector);
}