vec static method
vectors
Implementation
static CustomLayout vec(Layout elementLayout, {String? property}) {
final length = u32('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,
);
}