BloomAsyncFunction class

Metadata annotation declaring an asynchronous native function bridge.

Specifies the target thread execution model and optional platform method name.

Example:

@BloomAsyncFunction(thread: NativeThread.background, name: 'compressImage')
Future<String> compress(String path, int quality) =>
    invokeAsync('compressImage', {'path': path, 'quality': quality});

Constructors

BloomAsyncFunction({NativeThread thread = NativeThread.ui, String? name})
Creates a BloomAsyncFunction annotation.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
name → String?
Custom native method name override. When omitted, the Dart method name is used.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
thread → NativeThread
Execution thread queue on the host platform (defaults to NativeThread.ui).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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