array static method

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

Implementation

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