finish method

Uint8List finish()

Finish building the FlatBuffer and return array of bytes.

Can be called multiple times, to get the array of bytes. After the first call, adding values, or starting vectors / maps will result in an exception.

Implementation

Uint8List finish() {
  if (_finished == false) {
    _finish();
  }
  return _buffer.buffer.asUint8List(0, _offset);
}