newTaskRefBuilder method
create a task ref builder target_id: event id of target task_list: event id of task list action: link/embed/embed-subscribe/embed-accept-assignment/embed-mark-done
Implementation
RefDetailsBuilder newTaskRefBuilder(
String targetId,
String? roomId,
String taskList,
String? action,
) {
final tmp0 = targetId;
final tmp4 = roomId;
final tmp10 = taskList;
final tmp14 = action;
var tmp1 = 0;
var tmp2 = 0;
var tmp3 = 0;
var tmp5 = 0;
var tmp7 = 0;
var tmp8 = 0;
var tmp9 = 0;
var tmp11 = 0;
var tmp12 = 0;
var tmp13 = 0;
var tmp15 = 0;
var tmp17 = 0;
var tmp18 = 0;
var tmp19 = 0;
final tmp0_0 = utf8.encode(tmp0);
tmp2 = tmp0_0.length;
final ffi.Pointer<ffi.Uint8> tmp1_0 = this.__allocate(tmp2 * 1, 1);
final Uint8List tmp1_1 = tmp1_0.asTypedList(tmp2);
tmp1_1.setAll(0, tmp0_0);
tmp1 = tmp1_0.address;
tmp3 = tmp2;
if (tmp4 == null) {
tmp5 = 0;
} else {
tmp5 = 1;
final tmp6 = tmp4;
final tmp6_0 = utf8.encode(tmp6);
tmp8 = tmp6_0.length;
final ffi.Pointer<ffi.Uint8> tmp7_0 = this.__allocate(tmp8 * 1, 1);
final Uint8List tmp7_1 = tmp7_0.asTypedList(tmp8);
tmp7_1.setAll(0, tmp6_0);
tmp7 = tmp7_0.address;
tmp9 = tmp8;
}
final tmp10_0 = utf8.encode(tmp10);
tmp12 = tmp10_0.length;
final ffi.Pointer<ffi.Uint8> tmp11_0 = this.__allocate(tmp12 * 1, 1);
final Uint8List tmp11_1 = tmp11_0.asTypedList(tmp12);
tmp11_1.setAll(0, tmp10_0);
tmp11 = tmp11_0.address;
tmp13 = tmp12;
if (tmp14 == null) {
tmp15 = 0;
} else {
tmp15 = 1;
final tmp16 = tmp14;
final tmp16_0 = utf8.encode(tmp16);
tmp18 = tmp16_0.length;
final ffi.Pointer<ffi.Uint8> tmp17_0 = this.__allocate(tmp18 * 1, 1);
final Uint8List tmp17_1 = tmp17_0.asTypedList(tmp18);
tmp17_1.setAll(0, tmp16_0);
tmp17 = tmp17_0.address;
tmp19 = tmp18;
}
final tmp20 = _newTaskRefBuilder(
tmp1,
tmp2,
tmp3,
tmp5,
tmp7,
tmp8,
tmp9,
tmp11,
tmp12,
tmp13,
tmp15,
tmp17,
tmp18,
tmp19,
);
final tmp22 = tmp20.arg0;
final tmp23 = tmp20.arg1;
final tmp24 = tmp20.arg2;
final tmp25 = tmp20.arg3;
final tmp26 = tmp20.arg4;
if (tmp22 == 0) {
debugAllocation("handle error", tmp23, tmp24);
final ffi.Pointer<ffi.Uint8> tmp23_0 = ffi.Pointer.fromAddress(tmp23);
final tmp22_0 =
utf8.decode(tmp23_0.asTypedList(tmp24), allowMalformed: true);
if (tmp24 > 0) {
final ffi.Pointer<ffi.Void> tmp23_0;
tmp23_0 = ffi.Pointer.fromAddress(tmp23);
this.__deallocate(tmp23_0, tmp25, 1);
}
throw tmp22_0;
}
final ffi.Pointer<ffi.Void> tmp26_0 = ffi.Pointer.fromAddress(tmp26);
final tmp26_1 = _Box(this, tmp26_0, "drop_box_RefDetailsBuilder");
tmp26_1._finalizer = this._registerFinalizer(tmp26_1);
final tmp21 = RefDetailsBuilder._(this, tmp26_1);
return tmp21;
}