runtimeModelName function

String runtimeModelName(
  1. String modelPath
)

Returns the stable runtime-release file name for modelPath.

modelPath may be relative to example/assets/models, or it may include that prefix. Both / and \\ separators are accepted.

Implementation

String runtimeModelName(String modelPath) {
  final normalized = _normalizeModelPath(modelPath);
  return runtimeModelNamesByPath[normalized] ??
      (throw ArgumentError.value(modelPath, 'modelPath', 'Unknown model'));
}