MnnEnginePlatform class abstract

Inheritance
  • Object
  • PlatformInterface
  • MnnEnginePlatform
Implementers

Constructors

MnnEnginePlatform()

Properties

events → Stream<MnnRuntimeEvent>
no setter
hashCode → int
The hash code for this object.
no setterinherited
logs → Stream<MnnLogEntry>
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelGeneration() → Future<void>
checkPort({required MnnServerBindMode bindMode, required int port}) → Future<MnnPortCheckResult>
Performs an advisory bind probe without starting the server. It is useful for diagnostics only; callers should still handle port_in_use from startServer, because a probe and a later bind are not atomic.
clearLogs() → Future<void>
clearMmapCache({String? modelId}) → Future<MnnMmapCacheInfo>
deleteImportedModel(String modelId) → Future<void>
getBackendCapabilities() → Future<List<MnnBackendCapability>>
getLogSnapshot() → Future<List<MnnLogEntry>>
getMmapCache({String? modelId}) → Future<MnnMmapCacheInfo>
getSnapshot() → Future<MnnRuntimeSnapshot>
getTestRootPath() → Future<String>
importModelDirectory({required bool replaceExisting}) → Future<MnnModelInfo>
importModelDirectoryWithResult({required bool replaceExisting, required bool autoRename, required List<String> unavailableNames}) → Future<MnnModelImportResult>
importModelFromPath(String directoryPath, {required bool replaceExisting}) → Future<MnnModelInfo>
Imports a model directory the app already owns (e.g. a finished download in private storage) without going through the SAF picker.
importModelFromPathWithResult(String directoryPath, {required bool replaceExisting, required bool autoRename, required List<String> unavailableNames}) → Future<MnnModelImportResult>
initialize() → Future<MnnEngineInfo>
listImportedModels() → Future<List<MnnModelInfo>>
loadModel(String modelId, {MnnLoadOptions options = const MnnLoadOptions()}) → Future<MnnModelInfo>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
renameImportedModel(String modelId, String newName) → Future<MnnModelInfo>
startServer({required MnnServerBindMode bindMode, required int port, String? apiKey}) → Future<MnnServerInfo>
stopServer() → Future<void>
toString() → String
A string representation of this object.
inherited
unloadModel() → Future<void>

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance ↔ MnnEnginePlatform
getter/setter pair