newThumbSize method
create size object to be used for thumbnail download
Implementation
ThumbnailSize newThumbSize(
int width,
int height,
) {
final tmp0 = width;
final tmp2 = height;
var tmp1 = 0;
var tmp3 = 0;
tmp1 = tmp0;
tmp3 = tmp2;
final tmp4 = _newThumbSize(
tmp1,
tmp3,
);
final tmp6 = tmp4.arg0;
final tmp7 = tmp4.arg1;
final tmp8 = tmp4.arg2;
final tmp9 = tmp4.arg3;
final tmp10 = tmp4.arg4;
if (tmp6 == 0) {
debugAllocation("handle error", tmp7, tmp8);
final ffi.Pointer<ffi.Uint8> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
final tmp6_0 =
utf8.decode(tmp7_0.asTypedList(tmp8), allowMalformed: true);
if (tmp8 > 0) {
final ffi.Pointer<ffi.Void> tmp7_0;
tmp7_0 = ffi.Pointer.fromAddress(tmp7);
this.__deallocate(tmp7_0, tmp9, 1);
}
throw tmp6_0;
}
final ffi.Pointer<ffi.Void> tmp10_0 = ffi.Pointer.fromAddress(tmp10);
final tmp10_1 = _Box(this, tmp10_0, "drop_box_ThumbnailSize");
tmp10_1._finalizer = this._registerFinalizer(tmp10_1);
final tmp5 = ThumbnailSize._(this, tmp10_1);
return tmp5;
}