send method

Future<ByteData> send (String channel, ByteData message)

Send a binary message to the platform plugins on the given channel.

Returns a Future which completes to the received response, undecoded, in binary form.

Implementation

static Future<ByteData> send(String channel, ByteData message) {
  final _MessageHandler handler = _mockHandlers[channel];
  if (handler != null)
    return handler(message);
  return _sendPlatformMessage(channel, message);
}