NpuPlatform class abstract interface

What the NPU code needs from the app's platform layer that plain Dart cannot answer: the build's NativeAssetsManifest.json, and on Android a dispatch directory the app's native side prepares. The Flutter one is FlutterNpuPlatform (flutter_npu_platform.dart), which reads the manifest through rootBundle and asks core's flutter_gemma_bundled channel.

Properties

executableDir → String
The directory of the running executable: where Native Assets puts a Linux app's lib/ and a Windows app's DLLs (executableDirOf).
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepareAndroidDispatchDir(List<String> libFileNames, NpuStack vendor) → Future<String?>
A directory on Android holding exactly libFileNames (lib<name>.so) for LiteRT to load vendor's dispatch from, or null when the native side returned none. Throws NpuDispatchUnavailableException when the stack cannot be prepared.
readNativeAssetsManifest() → Future<String>
The text of the build's NativeAssetsManifest.json. Throws when it cannot be read; checkNpuStackInManifest turns that into NpuStackCheck.unknown.
toString() → String
A string representation of this object.
inherited

Operators

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