UDPipeService class

Singleton service that wraps the UDPipe WASM module via JS interop.

The WASM module (web/udpipe_ffi.wasm) must be built with Emscripten before running the web target. See make wasm or build_wasm.ps1.

Constructors

UDPipeService()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isAvailable bool
Whether a model is loaded and process can be called.
no setter
loadError String?
Human-readable error message when status is UDPipeStatus.error.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status ValueNotifier<UDPipeStatus>
Current loading state. Listen to this notifier to react to state changes.
final
whenReady Future<void>
Completes when the current init call finishes (or immediately if idle).
no setter

Methods

dispose() → void
Frees the WASM model handle. Call before loading a different model.
init({String modelId = 'german-gsd'}) Future<void>
Loads the model identified by modelId (one of kUdpipeModels). Returns immediately if the requested model is already loaded.
initFromAsset(String assetPath) Future<void>
Loads a model from an arbitrary Flutter asset path.
initFromBytes(Uint8List bytes) Future<void>
Loads a model directly from bytes (e.g. downloaded at runtime).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
process(String text) UDPipeResult
Runs UDPipe on text and returns the parsed result.
processAllBlocksAsync(List<String> blocks) Future<List<UDPipeResult>>
Processes blocks in micro-task batches to keep the UI responsive.
processBatchPerBlock(List<String> blocks) List<UDPipeResult>
Processes blocks synchronously, returning one UDPipeResult per block.
toString() String
A string representation of this object.
inherited

Operators

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