isBool property

bool get isBool

Checks if the string is a boolean literal (true/false, case-insensitive).

Implementation

bool get isBool {
  final value = this;
  if (value == null) return false;
  final normalized = value.trim().toLowerCase();
  return normalized == 'true' || normalized == 'false';
}