# containsType method

1. @override

Future<bool> containsType(

1. Class type, [
2. bool allowPodProviderInit = false

])
override

Checks if the factory contains a pod of the specified type.

This method is useful for checking the availability of a pod before attempting to retrieve it.

## Usage Example:

    if (await factory.containsType(Class<UserService>())) {
      final userService = await factory.getPod<UserService>('userService');
      userService.doSomething();
    }

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

## Implementation

    @override
    Future<bool> containsType(Class type, [bool allowPodProviderInit = false]) async {
      final f = getPodFactory();

      if (await f.containsType(type, allowPodProviderInit)) {
        return true;
      }

      if (_parent != null) {
        return _parent!.getPodFactory().containsType(type, allowPodProviderInit);
      }

      return false;
    }