$setFlag method Null safety

void $setFlag(
  1. bool on
)

Implementation

void $setFlag(bool on) {
	final int index = _flagsBitNumber ~/ 8;
	if (index >= $flags.length) $flags.add(0);
	if (on) $flags[index] |= 1 << (_flagsBitNumber % 8);
	_flagsBitNumber++;
}