isBool static method

bool isBool(
  1. String value
)

Checks if string is boolean.

Implementation

static bool isBool(String value) {
  if (isNull(value)) {
    return false;
  }

  return (value == 'true' || value == 'false');
}