addSingleton<T> abstract method
Null safety
Register a Singleton instance.
It will generate a single instance for the duration of
the application, or until manually removed.
The object will be started as soon as it is registered.
injector.addSingleton(MyController.new);
Implementation
void addSingleton<T>(
Function constructor, {
String? tag,
DisposeCallback<T>? onDispose,
NotifierCallback<T>? notifier,
});