putOrGet<S> method
Puts the dependency
, if it isn't Inst.isRegistered.
Implementation
S putOrGet<S>(
S Function() dependency, {
String? tag,
bool permanent = false,
}) {
if (isRegistered<S>(tag: tag)) {
return find<S>(tag: tag);
}
return put<S>(dependency(), tag: tag, permanent: permanent);
}