getPodNames method
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 {
List<String> list = List<String>.from(await getPodFactory().getPodNames(type, includeNonSingletons: includeNonSingletons, allowEagerInit: allowEagerInit));
if (_parent != null) {
list.addAll(await _parent!.getPodFactory().getPodNames(type, includeNonSingletons: includeNonSingletons, allowEagerInit: allowEagerInit));
}
return list;
}