boolToInt static method

int boolToInt(
  1. bool value
)

Converts a boolean value to an integer (0 or 1).

Implementation

static int boolToInt(bool value) {
  return value ? 1 : 0;
}