writeBool method

void writeBool(
  1. int id,
  2. bool value
)

Writes a boolean — an unsigned 0/1; booleans have no wire type of their own (CORELIB_PLAN §4.4).

Implementation

void writeBool(int id, bool value) =>
    _writeHeaderAndVarint(id, WireType.unsigned, value ? 1 : 0);