invokeRaw method

Map invokeRaw({
  1. required Map data,
  2. String? pathLib,
})

Implementation

Map invokeRaw({
  required Map data,
  String? pathLib,
}) {
  Pointer<Utf8> data_native = json.encode(data).toNativeUtf8();
  Pointer<Utf8> request_result = library(pathLib: pathLib)
      .lookupFunction<RequestNative, RequestDart>("request")
      .call(data_native);
  malloc.free(data_native);
  Map result = (json.decode(request_result.toDartString()) as Map);
  malloc.free(request_result);
  return result;
}