send<T> static method

Future<WireSendResults> send<T>(
  1. String signal, {
  2. T? payload,
  3. Object? scope,
})

Send signal through all wires has the signal string value Payload is optional, default is null, passed to WireListener from transfer If use scope then only wire with this scope value will receive the payload All middleware will be informed from WireMiddleware.onSend before signal sent on wires

Returns WireSendResults which contains data from all listeners that react on the signal

Implementation

static Future<WireSendResults> send<T>(String signal, {T? payload, Object? scope}) async {
  await _MIDDLEWARE_LAYER.onSend(signal, payload);
  return _COMMUNICATION_LAYER.send(signal, payload, scope);
}