isBool static method

bool isBool(
  1. String value
)

Checks if the string represents a boolean value.

@param value The string to check. @return True if the string is "true" or "false", case-sensitive.

Implementation

static bool isBool(String value) {
  return value == "true" || value == "false";
}