getProvider<T> abstract method
Retrieves a provider for a pod, allowing for lazy or eager initialization.
A provider gives more control over when and how a pod is instantiated. This is useful for lazy loading or when you need to manage the lifecycle of pods more precisely.
Usage Example:
final provider = await factory.getProvider<DatabaseService>(
'databaseService',
Class<DatabaseService>(),
allowEagerInit: true,
);
// Get the instance when needed
final database = await provider.get();
@param podName The name of the pod to provide @param type The class type of the pod @param allowEagerInit Whether to allow eager initialization @return A Future that completes with an ObjectProvider for the pod
Implementation
Future<ObjectProvider<T>> getProvider<T>(Class<T> type, {String? podName, bool allowEagerInit = false});