xdrVec static method

CustomLayout xdrVec(
  1. Layout elementLayout, {
  2. String? property,
})

Implementation

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