register method
Register services with the container.
This method is called when the provider is registered with the container. Use this method to register bindings, instances, and aliases.
Implementation
@override
void register(Container container) {
if (!container.has<Config>()) {
return;
}
if (container.has<CacheManager>()) {
_managedManager = null;
_ownsManagedManager = false;
return;
}
final manager = _buildManager(container, container.get<Config>());
_managedManager = manager;
container.instance<CacheManager>(manager);
_ownsManagedManager = true;
}