assertExhausted method
void
assertExhausted()
Verifies that no partial frame remains buffered. Call after the engine signalled end-of-stream. Throws FormatException when there are trailing bytes (always indicates a wire-format bug).
Implementation
void assertExhausted() {
if (_buffer.isNotEmpty) {
throw FormatException(
'MultiResultStreamDecoder: ${_buffer.length} trailing bytes after '
'end-of-stream',
);
}
}