getModelPath static method

Future<String> getModelPath(
  1. String fileName
)

Absolute on-device read path for an installed model file, keyed by its fileName (the file's basename, e.g. gemma-4-E2B-it.litertlm). On web this resolves to a URL/OPFS handle, not a filesystem path. The path is computed, not stat-ed — it is returned even if nothing is installed there.

Implementation

static Future<String> getModelPath(String fileName) =>
    ServiceRegistry.instance.fileSystemService.getReadTargetPath(fileName);