reportContent method
report an event from this room score - The score to rate this content as where -100 is most offensive and 0 is inoffensive (optional). reason - The reason for the event being reported (optional).
Implementation
Future<bool> reportContent(
String eventId,
int? score,
String? reason,
) {
final tmp1 = eventId;
final tmp5 = score;
final tmp9 = reason;
var tmp0 = 0;
var tmp2 = 0;
var tmp3 = 0;
var tmp4 = 0;
var tmp6 = 0;
var tmp8 = 0;
var tmp10 = 0;
var tmp12 = 0;
var tmp13 = 0;
var tmp14 = 0;
tmp0 = _box.borrow();
final tmp1_0 = utf8.encode(tmp1);
tmp3 = tmp1_0.length;
final ffi.Pointer<ffi.Uint8> tmp2_0 = _api.__allocate(tmp3 * 1, 1);
final Uint8List tmp2_1 = tmp2_0.asTypedList(tmp3);
tmp2_1.setAll(0, tmp1_0);
tmp2 = tmp2_0.address;
tmp4 = tmp3;
if (tmp5 == null) {
tmp6 = 0;
} else {
tmp6 = 1;
final tmp7 = tmp5;
tmp8 = tmp7;
}
if (tmp9 == null) {
tmp10 = 0;
} else {
tmp10 = 1;
final tmp11 = tmp9;
final tmp11_0 = utf8.encode(tmp11);
tmp13 = tmp11_0.length;
final ffi.Pointer<ffi.Uint8> tmp12_0 = _api.__allocate(tmp13 * 1, 1);
final Uint8List tmp12_1 = tmp12_0.asTypedList(tmp13);
tmp12_1.setAll(0, tmp11_0);
tmp12 = tmp12_0.address;
tmp14 = tmp13;
}
final tmp15 = _api._spaceReportContent(
tmp0,
tmp2,
tmp3,
tmp4,
tmp6,
tmp8,
tmp10,
tmp12,
tmp13,
tmp14,
);
final tmp17 = tmp15;
final ffi.Pointer<ffi.Void> tmp17_0 = ffi.Pointer.fromAddress(tmp17);
final tmp17_1 = _Box(_api, tmp17_0, "__Space_report_content_future_drop");
tmp17_1._finalizer = _api._registerFinalizer(tmp17_1);
final tmp16 = _nativeFuture(tmp17_1, _api.__spaceReportContentFuturePoll);
return tmp16;
}