ModeratorCapsuleItemAttachment.fromBinary constructor
ModeratorCapsuleItemAttachment.fromBinary(
- Uint8List data
Implementation
factory ModeratorCapsuleItemAttachment.fromBinary(Uint8List data) {
var bdata = new ByteData.view(data.buffer);
int bleng = bdata.getUint64(0);
int xx = bdata.getUint64(8);
int cidl = bdata.getUint8(16);
if (cidl == 0) {
return ModeratorCapsuleItemAttachment(bleng, xx, '');
}
String cid = utf8.decode(data.sublist(17, 17 + cidl));
return ModeratorCapsuleItemAttachment(bleng, xx, cid);
}