has method

bool has(
  1. int fieldId
)

Whether fieldId is present in the encoded bytes.

Implementation

bool has(int fieldId) {
  final cursor = this.cursor();
  while (cursor.next()) {
    if (cursor.fieldId == fieldId) return true;
  }
  return false;
}