toBool method
Transform string to boolean type
Implementation
bool toBool({bool falseOnError = false}) {
if (ValidatorUtils.isBool(this)) return this == 'true';
if (falseOnError) return false;
throw FormatException('Can only acception boolean value');
}