put<S> static method
Instantiates and registers a dependency using a builder.
The builder is executed immediately.
// Example usage:
final service = Ls.put(() => MyService());
Parameters:
builder: A function that creates the dependency instance.tag: Optional unique identifier to allow multiple instances of the same typeS.permanent: Iftrue, this instance survives a non-forced reset.
Returns the created instance of type S.
Implementation
static S put<S>(S Function() builder, {String? tag, bool permanent = false}) {
return currentScope.put<S>(builder, tag: tag, permanent: permanent);
}