greedyArray static method
arrays with greedy size layout.
Implementation
static CustomLayout greedyArray(Layout elementLayout, {String? property}) {
final layout = struct([
seq(elementLayout, greedy(elementSpan: elementLayout.span),
property: 'values'),
]);
return CustomLayout<Map<String, dynamic>, dynamic>(
layout: layout,
decoder: (data) => data['values'],
encoder: (values) => {'values': values},
property: property,
);
}