Future sendJSON(String channel, json)

Sends a JSON-encoded message to the host application and JSON-decodes the response.

Source

static Future<dynamic> sendJSON(String channel, dynamic json) async {
  return _decodeJSON(await sendString(channel, _encodeJSON(json)));
}