containsType abstract method

Future<bool> containsType(
  1. Class type, [
  2. bool allowPodProviderInit = false
])

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

Future<bool> containsType(Class type, [bool allowPodProviderInit = false]);