getCharacterCountBits method

int getCharacterCountBits(
  1. Version version
)

@param version version in question @return number of bits used, in this QR Code symbol Version, to encode the count of characters that will follow encoded in this Mode

Implementation

int getCharacterCountBits(Version version) {
  final number = version.versionNumber;
  int offset;
  if (number <= 9) {
    offset = 0;
  } else if (number <= 26) {
    offset = 1;
  } else {
    offset = 2;
  }
  return _characterCountBitsForVersions[offset];
}