FlutterOnnxruntimeWebPlugin class
Web implementation of FlutterOnnxruntimePlatform
using Dart JS interop.
- Inheritance
-
- Object
- PlatformInterface
- FlutterOnnxruntimeWebPlugin
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
callMethod(
JSObject obj, String method, List args) → dynamic -
closeSession(
String sessionId) → Future< void> - Close a session
-
convertOrtValue(
String valueId, String targetType) → Future< Map< String, dynamic> > - Converts an OrtValue to a different data type
-
createInferenceSession(
String modelPath, JSObject options) → Future< JSObject> - Creates an inference session using onnxruntime-web
-
createJSObject(
) → JSObject -
createJsSessionOptions(
Map< String, dynamic> ? options) → JSObject - Creates JavaScript session options object
-
createOrtValue(
String sourceType, dynamic data, List< int> shape) → Future<Map< String, dynamic> > - Creates an OrtValue from data
-
createSession(
String modelPath, {Map< String, dynamic> ? sessionOptions}) → Future<Map< String, dynamic> > -
getAvailableProviders(
) → Future< List< String> > - Get the available providers
-
getInputInfo(
String sessionId) → Future< List< Map< >String, dynamic> > - Get input info about the model
-
getInputNames(
JSObject session) → List< String> - Get input names from the session
-
getMetadata(
String sessionId) → Future< Map< String, dynamic> > - Get metadata about the model
-
getOrtValueData(
String valueId) → Future< Map< String, dynamic> > - Gets the data from an OrtValue
-
getOutputInfo(
String sessionId) → Future< List< Map< >String, dynamic> > - Get output info about the model
-
getOutputNames(
JSObject session) → List< String> - Get output names from the session
-
getPlatformVersion(
) → Future< String?> - Get the platform version
-
getProperty(
JSObject obj, String name) → dynamic -
hasProperty(
JSObject obj, String name) → bool -
jsArrayFrom(
List list) → JSObject -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
promiseToFuture<
T> (JSObject promise) → Future< T> -
releaseOrtValue(
String valueId) → Future< void> - Releases native resources associated with an OrtValue
-
runInference(
String sessionId, Map< String, OrtValue> inputs, {Map<String, dynamic> ? runOptions}) → Future<Map< String, dynamic> > - Run inference on a session
-
setProperty(
JSObject obj, String name, dynamic value) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
registerWith(
Registrar registrar) → void -
Registers this class as the default instance of
FlutterOnnxruntimePlatform
.