isBool property

bool get isBool

Checks if string is boolean.

Implementation

bool get isBool {
  if (isEmpty) {
    return false;
  }

  return (equalsIgnoreCase('true') || equalsIgnoreCase('false'));
}