asyncInstanceOf<T extends Object> static method
Async singleton class like:
class A { A._(); // Private constructor
static Future get instance => Singleton.asyncInstanceOf(() async => A._()); }
Implementation
static Future<T> asyncInstanceOf<T extends Object>(
SingletonAsyncInstanceCaller<T> callback,
) async {
return _proxies[T] ??= await callback.call();
}