sendReceive method

Future sendReceive (
  1. dynamic requestData
)

Implementation

Future<dynamic> sendReceive(dynamic requestData) async {
  final rp = ReceivePort();
  final request = {
    "sendPort": rp.sendPort,
    "requestData": requestData,
  };
  _sendPort.send(request);
  final result = await rp.first;
  return result;
}