put<S> method
Instantiates and registers a dependency.
Registers within the nearest LScope if available; otherwise uses global Levit.
Implementation
S put<S>(S Function() builder, {String? tag, bool permanent = false}) {
final scope = _ScopeProvider.of(_context);
if (scope != null) {
return scope.put<S>(builder, tag: tag, permanent: permanent);
}
return Levit.put<S>(builder, tag: tag, permanent: permanent);
}