# getPodsOf<T> method

1. @override

Future<Map<String, T>> getPodsOf<T>(

1. Class<T> type, {
2. bool includeNonSingletons = false,
3. bool allowEagerInit = false,

})
override

Retrieves all pods of the specified type as a map of name to instance.

This method provides a convenient way to get all pods of a type along with their registered names.

## Usage Example:

    final services = await factory.getPodsOf<Service>(
      Class<Service>(),
      includeNonSingletons: false, // Only singletons
    );

    for (final entry in services.entries) {
      print('Service ${entry.key}: ${entry.value}');
    }

@param type The type of pods to find @param includeNonSingletons Whether to include non-singleton pods @param allowEagerInit Whether to allow eager initialization during lookup @return A Future that completes with a map of pod names to instances

## Implementation

    @override
    Future<Map<String, T>> getPodsOf<T>(Class<T> type, {bool includeNonSingletons = false, bool allowEagerInit = false}) async {
      final result = <String, T>{};
      final podNames = await getPodNames(type, includeNonSingletons: includeNonSingletons, allowEagerInit: allowEagerInit);

      for (final name in podNames) {
        try {
          final pod = await getPod<T>(name);
          if (pod is! NullablePod) {
            result[name] = pod;
          }
        } on PodNotOfRequiredTypeException catch (_) {
          // ignore
        } on PodCreationException catch (e) {
          if (e is PodCurrentlyInCreationException) {
    					String exPodName = (e as PodCurrentlyInCreationException).name;
    					if (isCurrentlyInCreation(exPodName)) {
    						if (_logger.getIsTraceEnabled()) {
    							_logger.trace("Ignoring match to currently created Pod '$exPodName': ${e.getMessage()}");
    						}

    						onSuppressedException(e);
    						// Ignore: indicates a circular reference when autowiring constructors.
    						// We want to find matches other than the currently created pod itself.
    						continue;
    					}
    				}

          rethrow;
        }
      }

      return result;
    }