toBool method

bool toBool({
  1. bool caseSensitive = false,
  2. bool def = false,
})

Implementation

bool toBool({bool caseSensitive = false, bool def = false}) {
  return bool.tryParse(str(), caseSensitive: caseSensitive) ?? def;
}