array static method

CustomLayout array(
  1. Layout elementLayout,
  2. int length, {
  3. String? property,
})

arrays

Implementation

static CustomLayout array(Layout elementLayout, int length,
    {String? property}) {
  final layout = struct([
    seq(elementLayout, Constant(length), property: 'values'),
  ]);
  return CustomLayout<Map<String, dynamic>, dynamic>(
    layout: layout,
    decoder: (data) => data['values'],
    encoder: (values) => {'values': values},
    property: property,
  );
}