send method

Future<void> send(
  1. DataFormatVersions version,
  2. SocketConnect socketConnect
)

Implementation

Future<void> send(
    DataFormatVersions version, SocketConnect socketConnect) async {
  try {
    final json = toJson();
    final jsonStr = jsonEncode(json);
    socketConnect.sendData(jsonStr, version);
  } catch (e, s) {
    print(e);
    print(s);
    debugPrint("flutterx:Sending data to Flutterx failed");
  }
}