Interpreter.fromBuffer constructor
Interpreter.fromBuffer(
- Uint8List buffer, {
- InterpreterOptions? options,
Not supported on web.
fromBuffer is a synchronous factory, but web model loading is
asynchronous, so it cannot construct an interpreter. Throws
UnsupportedError; use fromAsset or fromBytes (both async) instead.
Implementation
factory Interpreter.fromBuffer(
Uint8List buffer, {
InterpreterOptions? options,
}) {
throw UnsupportedError(
'Interpreter.fromBuffer is synchronous but web loading is async. '
'Use Interpreter.fromAsset or Interpreter.fromBytes instead.',
);
}