Converts the integer to a boolean, where 1 is true and all other values are false.
1
true
false
print(1.toBool()); // Output: true print(0.toBool()); // Output: false
bool toBool([int value = 1]) => validate().toBool(value);