nextUint8 function

int nextUint8(
  1. Iterator<MapEntry<int, int>> iterator
)

Return the next Uint8 from an iterator of Uint8Array.

There is an assumption on success.

Implementation

int nextUint8(Iterator<MapEntry<int, int>> iterator) {
  if (iterator.moveNext()) {
    return iterator.current.value;
  } else {
    throw StateError('No more elements in the iterator.');
  }
}