toBooleanOrNull method

bool? toBooleanOrNull()

Implementation

bool? toBooleanOrNull() {
  final normalized = toLowerCase();
  if (normalized == 'true') {
    return true;
  }
  if (normalized == 'false') {
    return false;
  }
  return null;
}