# isPodProvider method

1. @override

Future<bool> isPodProvider(

1. String name, [
2. RootPodDefinition? rpd

])
override

Checks if the specified pod name refers to a pod provider.

Pod providers are special pods that can create other pods. This method checks if the given pod name corresponds to a provider.

## Usage Example:

    if (await factory.isPodProvider('serviceProvider')) {
      print('serviceProvider is a pod provider');
    }

@param podName The name of the pod to check @param rpd Optional root pod definition for direct checking @return A Future that completes with true if the pod is a provider

## Implementation

    @override
    Future<bool> isPodProvider(String name, [RootPodDefinition? rpd]) async {
      if(rpd != null) {
        return rpd.isPodProvider || rpd.type.isAssignableFrom(POD_PROVIDER_CLASS);
      }

    		String transformed = transformedPodName(name);
      if (containsDefinition(name)) {
        final def = getDefinition(name);
        return def.isPodProvider || def.type.isAssignableFrom(POD_PROVIDER_CLASS);
      }

      if (containsSingleton(name)) {
        final instance = await getSingleton(transformed, allowEarlyReference: false);
        return instance is PodProvider;
      }

    		// No singleton instance found -> check pod definition.
      final parent = getParentFactory();
    		if (!containsDefinition(transformed) && parent is ConfigurablePodFactory) {
    			// No pod definition found in this provider -> delegate to parent.
    			return parent.isPodProvider(transformed);
    		}

    		return await isPodProvider(transformed, getLocalMergedPodDefinition(transformed));
    	}