BridgeBatchItem<T> class final

A single item in a BridgeInstance.batch call.

Carries a method name, typed payload, and optional per-item options.

Status (v1.0)

Batch support is reserved in v1.0. The BridgeBatchItem class is defined now so the API can be designed correctly, but BridgeInstance.batch throws UnimplementedError until v1.1. The BridgeMessageType.batch wire type is reserved in the protocol.

Example (v1.1+)

final results = await bridge.batch([
  BridgeBatchItem<LoginResponse>('auth.login', loginRequest),
  BridgeBatchItem<UserProfile>('user.profile', profileRequest),
  BridgeBatchItem<AppSettings>('app.settings', null),
]);
Annotations

Constructors

BridgeBatchItem(String method, Object? payload, {String? namespace, int? timeoutMs})
Creates a BridgeBatchItem.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
method String
The method name to invoke. May be namespace-qualified ("auth.login").
final
namespace String?
The optional namespace scope.
final
payload Object?
The request payload. May be null for methods that take no arguments.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeoutMs int?
Per-item timeout in milliseconds.
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