lazyPut<S> method
Registers a builder that will be executed only when the dependency is first requested.
Implementation
void lazyPut<S>(
S Function() builder, {
String? tag,
bool permanent = false,
bool isFactory = false,
}) {
final scope = _ScopeProvider.of(_context);
if (scope != null) {
scope.lazyPut<S>(
builder,
tag: tag,
permanent: permanent,
isFactory: isFactory,
);
} else {
Levit.lazyPut<S>(
builder,
tag: tag,
permanent: permanent,
isFactory: isFactory,
);
}
}