# resolveMultipleMappedPods method

1. @protected

Future<Object?> resolveMultipleMappedPods(

1. String? podName,
2. DependencyDescriptor descriptor,
3. Set<String>? autowiredPods

)

Resolves multiple pods as a mapped collection.

This method handles dependency resolution for Map<String, T> dependencies by finding all pods of the value type and mapping them by pod name.

`podName` the name of the pod requiring the dependency `descriptor` the dependency descriptor for the map `autowiredPods` optional set to track autowired pods

Returns a Map of pod names to pod instances, or `null` if no pods found

## Implementation

    @protected
    Future<Object?> resolveMultipleMappedPods(String? podName, DependencyDescriptor descriptor, Set<String>? autowiredPods) async {
      Class cls = descriptor.type;
      Class? keyType = descriptor.key ?? cls.keyType();
      Class? valueType = descriptor.component ?? cls.componentType();

      if (keyType != Class<String>()) {
        return null;
      }

      if (valueType == null) {
        return null;
      }

      final matchingPods = await findAutowireCandidates(podName, DependencyDescriptor(
        source: valueType,
        podName: descriptor.podName,
        propertyName: descriptor.propertyName,
        type: valueType,
        lookup: descriptor.lookup,
        isEager: descriptor.isEager,
        isRequired: descriptor.isRequired
      ));
      if (matchingPods.isEmpty) {
        return null;
      }

      final result = <String, Object>{};

      if (autowiredPods != null) {
        autowiredPods.addAll(matchingPods.keys);
      }

      for (final entry in matchingPods.entries) {
        final key = entry.key;
        final pod = entry.value;
        result[key] = convertIfNecessary(podName ?? entry.key, pod, valueType);
      }

      return result;
    }