put<S> static method
Register a dependency
Implementation
static S put<S>(S dependency, {String? tag, bool permanent = false}) {
final type = S;
if (!_dependencies.containsKey(type)) {
_dependencies[type] = {};
}
_dependencies[type]![tag] = _InstanceBuilder(
instance: dependency,
permanent: permanent,
);
// Call onInit and onReady if it's a controller with lifecycle
if (dependency is FlowLifeCycleMixin) {
dependency.init();
dependency.ready();
}
return dependency;
}