account method
return the account of the logged in user, if given
Implementation
Account account() {
var tmp0 = 0;
tmp0 = _box.borrow();
final tmp1 = _api._clientAccount(
tmp0,
);
final tmp3 = tmp1.arg0;
final tmp4 = tmp1.arg1;
final tmp5 = tmp1.arg2;
final tmp6 = tmp1.arg3;
final tmp7 = tmp1.arg4;
if (tmp3 == 0) {
debugAllocation("handle error", tmp4, tmp5);
final ffi.Pointer<ffi.Uint8> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
final tmp3_0 =
utf8.decode(tmp4_0.asTypedList(tmp5), allowMalformed: true);
if (tmp5 > 0) {
final ffi.Pointer<ffi.Void> tmp4_0;
tmp4_0 = ffi.Pointer.fromAddress(tmp4);
_api.__deallocate(tmp4_0, tmp6, 1);
}
throw tmp3_0;
}
final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
final tmp7_1 = _Box(_api, tmp7_0, "drop_box_Account");
tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
final tmp2 = Account._(_api, tmp7_1);
return tmp2;
}