xdrVecBytes static method

Layout<List<int>> xdrVecBytes({
  1. String? property,
})

Implementation

static Layout<List<int>> xdrVecBytes({String? property}) {
  final length = padding(u32be(property: "length"), propery: "length");
  final layout = struct([
    length,
    XDRBytesLayout(offset(length, -length.span), property: 'data'),
  ]);
  return CustomLayout<Map<String, dynamic>, List<int>>(
      layout: layout,
      encoder: (data) {
        return {"data": data};
      },
      decoder: (data) => data["data"],
      property: property);
}