flutter_rust_bridge library

Please refer to https://github.com/fzyzcjy/flutter_rust_bridge for full documentation.

The API exposed here is thin, because usually you only need to call the (rich-featured) automatically generated code.

You often do not need to use the APIs here, except (for example) when you want to customize some behaviors.

Classes

BaseHandler
Generically handles a Dart-Rust call.
Int64List
A strict version of $data.Int64List which always returns a BigInt.
NormalTask<S, E extends Object>
A task to call FFI function.
RustStreamSink<T>
The Rust StreamSink<T> on the Dart side.
SyncTask<S, E extends Object, WireSyncType>
A task to call FFI function, but it is synchronous.
Uint64List
A strict version of $data.Uint64List which always returns a BigInt.

Functions

loadExternalLibrary(ExternalLibraryLoaderConfig config) FutureOr<ExternalLibrary>
Load the ExternalLibrary, with the following cases in mind:

Exceptions / Errors

AnyhowException
The rust code returns anyhow::Error
FrbBacktracedException
Interface indicating exceptions that have backtrace (stack trace)
FrbException
Base class for exceptions in flutter_rust_bridge
MissingHeaderException
Thrown when the browser is not run in a cross-origin isolated environment.
PanicException
The rust code is panicked
PlatformMismatchException
Platform is not matched
UnmodifiableTypedListException
Cannot modify a typed list