avatar method
- ThumbnailSize? thumbSize
The avatar of the client if thumb size is given, avatar thumbnail is returned if thumb size is not given, avatar file is returned
Implementation
Future<OptionBuffer> avatar(
ThumbnailSize? thumbSize,
) {
final tmp1 = thumbSize;
var tmp0 = 0;
var tmp2 = 0;
var tmp4 = 0;
tmp0 = _box.borrow();
if (tmp1 == null) {
tmp2 = 0;
} else {
tmp2 = 1;
final tmp3 = tmp1;
tmp4 = tmp3._box.move();
}
final tmp5 = _api._accountAvatar(
tmp0,
tmp2,
tmp4,
);
final tmp7 = tmp5;
final ffi.Pointer<ffi.Void> tmp7_0 = ffi.Pointer.fromAddress(tmp7);
final tmp7_1 = _Box(_api, tmp7_0, "__Account_avatar_future_drop");
tmp7_1._finalizer = _api._registerFinalizer(tmp7_1);
final tmp6 = _nativeFuture(tmp7_1, _api.__accountAvatarFuturePoll);
return tmp6;
}