# containsPod method

1. @override

Future<bool> containsPod(

1. String name

)
override

Checks if a pod with the given name is registered in the factory.

This method checks both the current factory and parent factories in hierarchical configurations.

## Usage Example:

    if (await factory.containsPod('emailService')) {
      final emailService = await factory.getPod<EmailService>('emailService');
      await emailService.sendWelcomeEmail();
    }

@param podName The name of the pod to check @return A Future that completes with true if the pod exists

## Implementation

    @override
    Future<bool> containsPod(String name) async {
      final transformed = transformedPodName(name);

      if (containsSingleton(transformed) || containsDefinition(transformed)) {
    			return (!PodUtils.isFactoryDereference(name) || await isPodProvider(transformed));
    		}

      final parent = getParentFactory();
      return parent?.containsPod(PodUtils.originalName(name)) ?? false;
    }