isValidUnsignedByte static method
Checks if a value is within the valid unsigned byte range (0 to 255).
Example:
print(Byte.isValidUnsignedByte(255)); // true
print(Byte.isValidUnsignedByte(256)); // false
print(Byte.isValidUnsignedByte(-1)); // false
Implementation
static bool isValidUnsignedByte(int value) {
return value >= MIN_UNSIGNED_VALUE && value <= MAX_UNSIGNED_VALUE;
}