remoteMediaModelsFor function

List<String> remoteMediaModelsFor({
  1. required String? providerKind,
  2. required String slot,
  3. required RemoteModelsCatalog? catalog,
})

The media-model list the picker shows for the slot when no override is configured. Empty when the catalog doesn't list the slot — the picker falls through to manual entry, the existing behaviour.

Implementation

List<String> remoteMediaModelsFor({
  required String? providerKind,
  required String slot,
  required RemoteModelsCatalog? catalog,
}) {
  if (catalog == null) return const [];
  final entry = catalog.providers[providerKind ?? ''];
  if (entry == null) return const [];
  return entry.media[slot] ?? const [];
}