isSingleton method
Checks if the specified pod is configured as a singleton.
Singleton pods are instantiated only once and the same instance is returned for all subsequent requests.
Usage Example:
if (await factory.isSingleton('appConfig')) {
print('AppConfig is a singleton - all components share the same instance');
}
@param podName The name of the pod to check @return A Future that completes with true if the pod is a singleton
Implementation
@override
Future<bool> isSingleton(String podName) async {
final f = getPodFactory();
if (await f.containsLocalPod(podName)) {
return await f.isSingleton(podName);
}
if (_parent != null) {
return await _parent!.isSingleton(podName);
}
return false;
}