instance<T> method
Registers an already created instance as a singleton.
Useful for registering pre-configured objects or third-party instances that don't need factory functions.
T - The type of the instance
instance - The pre-created instance to register
Implementation
@override
void instance<T>(T instance) {
_instances[T] = instance;
}