flutter_rust_bridge_for_generated_web library

This is only intended to be used by automatically generated code, instead of developers.

Classes

AllowInteropFunctionWrapper
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
BaseApi
This is only intended to be used by automatically generated code, instead of developers.
BaseApiImpl<W extends BaseWire>
This is only intended to be used by automatically generated code, instead of developers.
BaseEntrypoint<A extends BaseApi, AI extends BaseApiImpl<BaseWire>, W extends BaseWire>
This is the main entrypoint. For example, users call init on it, and auto-generated code call api on it.
BaseHandler
Generically handles a Dart-Rust call.
BaseTask<S, E extends Object, WireSyncType>
Base class for various kinds of tasks.
BaseWire
This is only intended to be used by automatically generated code, instead of developers.
Box<T>
This is only intended to be used by automatically generated code, instead of developers.
ByteBuffer
A sequence of bytes underlying a typed data object.
ByteData
A fixed-length, random-access sequence of bytes that also provides random and unaligned access to the fixed-width integers and floating point numbers represented by those bytes.
BytesBuilder
Builds a list of bytes, allowing bytes and lists of bytes to be added at the end.
CstCodec<S, E extends Object>
This is only intended to be used by automatically generated code, instead of developers.
DcoCodec<S, E extends Object>
This is only intended to be used by automatically generated code, instead of developers.
Endian
Endianness of number representation.
ExternalLibrary
This is only intended to be used by automatically generated code, instead of developers.
ExternalLibraryLoaderConfig
Arguments of loadExternalLibary
Float32List
A fixed-length list of IEEE 754 single-precision binary floating-point numbers that is viewable as a TypedData.
Float32x4
Float32x4 immutable value type and operations.
Float32x4List
A fixed-length list of Float32x4 numbers that is viewable as a TypedData.
Float64List
A fixed-length list of IEEE 754 double-precision binary floating-point numbers that is viewable as a TypedData.
Float64x2
Float64x2 immutable value type and operations.
Float64x2List
A fixed-length list of Float64x2 numbers that is viewable as a TypedData.
FutureOr<T>
A type representing values that are either Future<T> or T.
Int16List
A fixed-length list of 16-bit signed integers that is viewable as a TypedData.
Int32List
A fixed-length list of 32-bit signed integers that is viewable as a TypedData.
Int32x4
Int32x4 and operations.
Int32x4List
A fixed-length list of Int32x4 numbers that is viewable as a TypedData.
Int64List
A strict version of $data.Int64List which always returns a BigInt.
Int8List
A fixed-length list of 8-bit signed integers.
JS
An annotation on a JavaScript interop declaration.
JSExport
Annotation to allow Dart classes to be wrapped with a JS object using dart:js_interop's createJSInteropWrapper.
NormalTask<S, E extends Object>
A task to call FFI function.
PlatformInt64Util
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
PlatformPointerUtil
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
RustArc<T>
The Rust std::sync::Arc on the Dart side.
RustArcStaticData<T>
Should have exactly one instance per type.
RustOpaque
An opaque pointer to a native arbitrary Rust type. TODO: link to the doc talking about "dispose"/GC semantics
RustOpaqueInterface
This is only intended to be used by automatically generated code, instead of developers.
RustStreamSink<T>
The Rust StreamSink<T> on the Dart side.
SseCodec<S, E extends Object>
This is only intended to be used by automatically generated code, instead of developers.
SseDeserializer
This is only intended to be used by automatically generated code, instead of developers.
SseSerializer
This is only intended to be used by automatically generated code, instead of developers.
SyncTask<S, E extends Object, WireSyncType>
A task to call FFI function, but it is synchronous.
TaskConstMeta
Metadata that does not change across different method calls. Thus it is made const to save memory and speed up
TypedData
A typed view of a sequence of bytes.
TypedDataList<E>
A TypedData fixed-length List-view on the bytes of buffer.
Uint16List
A fixed-length list of 16-bit unsigned integers that is viewable as a TypedData.
Uint32List
A fixed-length list of 32-bit unsigned integers that is viewable as a TypedData.
Uint64List
A strict version of $data.Uint64List which always returns a BigInt.
Uint8ClampedList
A fixed-length list of 8-bit unsigned integers.
Uint8List
A fixed-length list of 8-bit unsigned integers.

Mixins

SimpleDisposable
This is only intended to be used by automatically generated code, instead of developers.

Extension Types

ExternalDartReference
An opaque reference to a Dart object that can be passed to JavaScript.
JSAny
A non-nullish JavaScript value.
JSArray
A JavaScript Array.
JSArrayBuffer
A JavaScript ArrayBuffer.
JSBigInt
A JavaScript BigInt.
JSBoolean
A JavaScript boolean.
JSBoxedDartObject
A Dart object that is wrapped with a JavaScript object so that it can be passed to JavaScript safely.
JSDataView
A JavaScript DataView.
JSExportedDartFunction
A JavaScript callable function created from a Dart function.
JSFloat32Array
A JavaScript Float32Array.
JSFloat64Array
A JavaScript Float64Array.
JSFunction
A JavaScript Function value.
JSInt16Array
A JavaScript Int16Array.
JSInt32Array
A JavaScript Int32Array.
JSInt8Array
A JavaScript Int8Array.
JSNumber
A JavaScript number.
JSObject
A JavaScript Object.
JSPromise
A JavaScript Promise or a promise-like object.
JSString
A JavaScript string.
JSSymbol
A JavaScript Symbol.
JSTypedArray
Abstract supertype of all JavaScript typed arrays.
JSUint16Array
A JavaScript Uint16Array.
JSUint32Array
A JavaScript Uint32Array.
JSUint8Array
A JavaScript Uint8Array.
JSUint8ClampedArray
A JavaScript Uint8ClampedArray.

Extensions

BoolToJSBoolean on bool
Conversions from bool to JSBoolean.
ByteBufferToJSArrayBuffer on ByteBuffer
Conversions from ByteBuffer to JSArrayBuffer.
ByteDataToJSDataView on ByteData
Conversions from ByteData to JSDataView.
DoubleToJSNumber on double
Conversions from double to JSNumber.
ExternalDartReferenceToObject on ExternalDartReference<T>
Conversions from ExternalDartReference to the value of type T.
ExtReadBuffer on ReadBuffer
Extensions for ReadBuffer
ExtWriteBuffer on WriteBuffer
Extensions for WriteBuffer
Float32ListToJSFloat32Array on Float32List
Conversions from Float32List to JSFloat32Array.
Float64ListToJSFloat64Array on Float64List
Conversions from Float64List to JSFloat64Array.
FunctionToJSExportedDartFunction on Function
Conversions from Function to JSExportedDartFunction.
FutureOfJSAnyToJSPromise on Future<T>
Conversions from Future to JSPromise where the Future returns a value.
FutureOfVoidToJSPromise on Future<void>
Conversions from Future to JSPromise where the Future does not return a value.
Int16ListToJSInt16Array on Int16List
Conversions from Int16List to JSInt16Array.
Int32ListToJSInt32Array on Int32List
Conversions from Int32List to JSInt32Array.
Int8ListToJSInt8Array on Int8List
Conversions from Int8List to JSInt8Array.
JSAnyOperatorExtension on JSAny?
General-purpose JavaScript operators.
JSAnyUtilityExtension on JSAny?
Common utility functions that are useful for any JavaScript value.
JSArrayBufferToByteBuffer on JSArrayBuffer
Conversions from JSArrayBuffer to ByteBuffer.
JSArrayToList on JSArray<T>
Conversions from JSArray to List.
JSBooleanToBool on JSBoolean
Conversions from JSBoolean to bool.
JSBoxedDartObjectToObject on JSBoxedDartObject
Conversions from JSBoxedDartObject to Object.
JSDataViewToByteData on JSDataView
Conversions from JSDataView to ByteData.
JSExportedDartFunctionToFunction on JSExportedDartFunction
Conversions from JSExportedDartFunction to Function.
JSFloat32ArrayToFloat32List on JSFloat32Array
Conversions from JSFloat32Array to Float32List.
JSFloat64ArrayToFloat64List on JSFloat64Array
Conversions from JSFloat64Array to Float64List.
JSFunctionUtilExtension on JSFunction
Utility extensions for JSFunction.
JSInt16ArrayToInt16List on JSInt16Array
Conversions from JSInt16Array to Int16List.
JSInt32ArrayToInt32List on JSInt32Array
Conversions from JSInt32Array to Int32List.
JSInt8ArrayToInt8List on JSInt8Array
Conversions from JSInt8Array to Int8List.
JSNumberToNumber on JSNumber
Conversions from JSNumber to double or int.
JSPromiseToFuture on JSPromise<T>
Conversions from JSPromise to Future.
JSStringToString on JSString
Conversions from JSString to String.
JSUint16ArrayToInt16List on JSUint16Array
Conversions from JSUint16Array to Uint16List.
JSUint32ArrayToUint32List on JSUint32Array
Conversions from JSUint32Array to Uint32List.
JSUint8ArrayToUint8List on JSUint8Array
Conversions from JSUint8Array to Uint8List.
JSUint8ClampedArrayToUint8ClampedList on JSUint8ClampedArray
Conversions from JSUint8ClampedArray to Uint8ClampedList.
ListToJSArray on List<T>
Conversions from List to JSArray.
NullableObjectUtilExtension on Object?
Common utility functions for Object?s.
NullableUndefineableJSAnyExtension on JSAny?
Helper methods to determine if a value is JavaScript undefined or null.
NumToJSExtension on num
Conversions from num to JSNumber.
ObjectToExternalDartReference on T
Conversions from a value of type T to ExternalDartReference.
ObjectToJSBoxedDartObject on Object
Conversions from Object to JSBoxedDartObject.
StringToJSString on String
Conversions from String to JSString.
Uint16ListToJSInt16Array on Uint16List
Conversions from Uint16List to JSUint16Array.
Uint32ListToJSUint32Array on Uint32List
Conversions from Uint32List to JSUint32Array.
Uint8ClampedListToJSUint8ClampedArray on Uint8ClampedList
Conversions from Uint8ClampedList to JSUint8ClampedArray.
Uint8ListToJSUint8Array on Uint8List
Conversions from Uint8List to JSUint8Array.

Constants

anonymous → const _Anonymous
An annotation that indicates a JS annotated class is structural and does not have a known JavaScript prototype.
internal → const _Internal
Used to annotate a declaration which should only be used from within the package in which it is declared, and which should not be exposed from said package's public API.
protected → const _Protected
Used to annotate an instance member in a class or mixin which is meant to be visible only within the declaring library, and to other instance members of the class or mixin, and their subtypes.
sealed → const _Sealed
Annotation marking a class as not allowed as a super-type outside of the current package.
staticInterop → const _StaticInterop
staticInterop enables the JS annotated class to be treated as a "static" interop class.

Properties

crossOriginIsolated bool?
Whether the web platform has been isolated by COOP and COEP headers, and is capable of sharing buffers between workers.
no setter
globalContext JSObject
The global scope that is used to find user-declared interop members.
no setter

Functions

castNativeBigInt(BigInt value) JSAny
This is only intended to be used by automatically generated code, instead of developers.
createJSInteropWrapper<T extends Object>(T dartObject) JSObject
Given a instance of a Dart class that contains an @JSExport annotation, creates a JavaScript object that wraps the given Dart object.
dcoDecodeDuration(int ts) Duration
This is only intended to be used by automatically generated code, instead of developers.
dcoDecodeI64(dynamic raw) BigInt
This is only intended to be used by automatically generated code, instead of developers.
dcoDecodeInt64List(List raw) → Int64List
This is only intended to be used by automatically generated code, instead of developers.
dcoDecodePanicError(dynamic raw) PanicException
This is only intended to be used by automatically generated code, instead of developers.
dcoDecodeTimestamp({required int ts, required bool isUtc}) DateTime
This is only intended to be used by automatically generated code, instead of developers.
dcoDecodeU64(dynamic raw) BigInt
This is only intended to be used by automatically generated code, instead of developers.
dcoDecodeUint64List(List raw) → Uint64List
This is only intended to be used by automatically generated code, instead of developers.
decodeDartOpaque(dynamic raw, GeneralizedFrbRustBinding generalizedFrbRustBinding) Object
This is only intended to be used by automatically generated code, instead of developers.
decodeDartOpaqueCommon(dynamic raw, GeneralizedFrbRustBinding generalizedFrbRustBinding) Object
This is only intended to be used by automatically generated code, instead of developers.
encodeDartOpaque(Object raw, NativePortType dartHandlerPort, GeneralizedFrbRustBinding generalizedFrbRustBinding) PlatformPointer
This is only intended to be used by automatically generated code, instead of developers.
encodeDartOpaqueCommon(Object raw, NativePortType dartHandlerPort, GeneralizedFrbRustBinding generalizedFrbRustBinding) PlatformPointer
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
importModule(JSAny moduleName) JSPromise<JSObject>
Dynamically imports a JavaScript module with the given moduleName using the JavaScript import() syntax.
initializeWasmModule({required String root}) Future<void>
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
jsBigIntToDartBigInt(Object raw) BigInt
This is only intended to be used by automatically generated code, instead of developers.
jsEval(String script) JSAny?
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
loadExternalLibrary(ExternalLibraryLoaderConfig config) FutureOr<ExternalLibrary>
Load the ExternalLibrary, with the following cases in mind:
maybeDartify(Object? object) Object?
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
pdeCallFfi(GeneralizedFrbRustBinding generalizedFrbRustBinding, SseSerializer serializer, {required int funcId, NativePortType? port}) WireSyncRust2DartSse?
This is only intended to be used by automatically generated code, instead of developers.
sseDecodePanicError(SseDeserializer deserializer) PanicException
This is only intended to be used by automatically generated code, instead of developers.
sseEncodeCastedPrimitiveI64(int raw) BigInt
This is only intended to be used by automatically generated code, instead of developers.
sseEncodeCastedPrimitiveU64(int raw) BigInt
This is only intended to be used by automatically generated code, instead of developers.
wireSyncRust2DartDcoIntoDart(WireSyncRust2DartDco syncReturn) List
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
wireSyncRust2DartSseAsUint8ListView(WireSyncRust2DartSse raw) Uint8List
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.

Typedefs

ApiImplConstructor<A extends BaseApiImpl<BaseWire>, W extends BaseWire> = A Function({required GeneralizedFrbRustBinding generalizedFrbRustBinding, required BaseHandler handler, required PortManager portManager, required W wire})
This is only intended to be used by automatically generated code, instead of developers.
CrossPlatformFinalizerArg = void Function(PlatformPointer)
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
DartPostCObject = void
This is only intended to be used by automatically generated code, instead of developers.
JSVoid = void
JS type equivalent for undefined for interop member return types.
NativePortType = EventTarget
This is only intended to be used by automatically generated code, instead of developers.
PlatformGeneralizedUint8List = AdaptedUint8List
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
PlatformGeneralizedUint8ListPtr = JSUint8Array
The code is used only internally and is not a public API. The comment exists mainly to satisfy the linter.
PlatformInt64 = BigInt
This is only intended to be used by automatically generated code, instead of developers.
PlatformPointer = int
This is only intended to be used by automatically generated code, instead of developers.
RustArcDecrementStrongCountFnType = void Function(PlatformPointer)
The type of RustArcStaticData._rustArcDecrementStrongCount
RustArcIncrementStrongCountFnType = void Function(PlatformPointer)
The type of RustArcStaticData._rustArcIncrementStrongCount
WireConstructor<W> = W Function(ExternalLibrary externalLibrary)
This is only intended to be used by automatically generated code, instead of developers.
WireSyncRust2DartDco = List
This is only intended to be used by automatically generated code, instead of developers.
WireSyncRust2DartSse = JSUint8Array
This is only intended to be used by automatically generated code, instead of developers.

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
NullRejectionException
Exception for when the promise is rejected with a null or undefined value.
PanicException
The rust code is panicked
PlatformMismatchException
Platform is not matched
UnmodifiableTypedListException
Cannot modify a typed list