nextKey method

  1. @override
Object? nextKey()
override

Moves to the next key-value pair in the collection and returns the key.

Returns null if there are no more key-value pairs to decode.

The key can be of type String or int depending on the format.

Implementation

@override
Object? nextKey() {
  index++;
  if (index < length) {
    return _unpacker.unpackString();
  } else {
    return null;
  }
}