Frame constructor

const Frame({
  1. required int type,
  2. required Uint8List payload,
})

Implementation

const Frame({
  required this.type,
  required this.payload,
})  : assert(type >= 0 && type <= 0xFF, 'Frame type must fit in 1 byte'),
      assert(payload.length <= 0xFFFF, 'Payload length must fit in uint16');