singleton<T> method
Registers a singleton instance.
Creates a binding that will cache the first created instance and return it for all subsequent resolutions.
T - The type to register as singleton
factory - Factory function that creates the instance
Implementation
@override
void singleton<T>(dynamic Function(ContainerInterface) factory) {
bind<T>(factory, singleton: true);
}