instanceOf<T extends Object> static method
Singleton class like:
class A { A._(); // Private constructor
static A get instance => Singleton.instanceOf(() => A._()); }
Implementation
static T instanceOf<T extends Object>(
SingletonInstanceCaller<T> caller,
) {
return _proxies[T] ??= caller.call();
}