getPodNames method

  1. @override
Future<List<String>> getPodNames(
  1. Class type, {
  2. bool includeNonSingletons = false,
  3. bool allowEagerInit = false,
})
override

Retrieves all pod names for pods of the specified type.

This method can include or exclude non-singleton pods and control eager initialization behavior.

Usage Example:

// Get all repository pod names
final repoNames = await factory.getPodNames(
  Class<Repository>(),
  includeNonSingletons: true,
);

for (final name in repoNames) {
  final repo = await factory.getPod<Repository>(name);
  await repo.initialize();
}

@param type The type of pods to find @param includeNonSingletons Whether to include non-singleton pods @param allowEagerInit Whether to allow eager initialization during lookup @return A Future that completes with a list of pod names

Implementation

@override
Future<List<String>> getPodNames(Class type, {bool includeNonSingletons = false, bool allowEagerInit = false}) async {
  _assertThatPodFactoryIsActive();

  return await getPodFactory().getPodNames(type, includeNonSingletons: includeNonSingletons, allowEagerInit: allowEagerInit);
}