isInstantiateSingleton<T> method

  1. @override
bool isInstantiateSingleton<T>({
  1. String? key,
})
inherited

checks if the instance registration is as singleton.
When key is provided it will search the instance that have the same key

Implementation

@override
bool isInstantiateSingleton<T>({String? key}) {
  final className = T.toString();
  final data = (key == null) ? layersGraph.getBindByClassName(this, className: className) : layersGraph.getBindByKey(this, bindKey: key);
  final bind = data?.value;
  return bind?.hasInstance ?? false;
}