# isTypeMatch method

1. @override

Future<bool> isTypeMatch(

1. String name,
2. Class typeToMatch, [
3. bool allowPodProviderInit = false

])
override

Checks if the pod with the specified name matches the given type.

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

## Usage Example:

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

@param name The name of the pod to check @param typeToMatch The class type to match @return A Future that completes with true if the pod matches the type

## Implementation

    @override
    Future<bool> isTypeMatch(String name, Class typeToMatch, [bool allowPodProviderInit = false]) async {
      final f = getPodFactory();

      if (await f.isTypeMatch(name, typeToMatch, allowPodProviderInit)) {
        return true;
      }

      if (_parent != null) {
        return _parent!.getPodFactory().isTypeMatch(name, typeToMatch, allowPodProviderInit);
      }

      return false;
    }