isBool static method

bool isBool(
  1. String text
)

Tests whether text is a valid boolean value. Allowed: 'true', 'false', 'yes', 'no' 't', 'f' (case insensitive)

Implementation

static bool isBool(String text) {
  var rc = false;
  if (text.isNotEmpty) {
    rc = regExprBool.firstMatch(text) != null;
  }
  return rc;
}