currentId static method

Future<String?> currentId(
  1. ModelCategory category
)

Model id currently loaded under category, or null.

Implementation

static Future<String?> currentId(ModelCategory category) async {
  if (!DartBridge.isInitialized) return null;
  final current = await RunAnywhereModelLifecycle.shared.current(
    model_pb.CurrentModelRequest(category: category),
  );
  if (!current.found || current.modelId.isEmpty) return null;
  return current.modelId;
}