asBool method

bool asBool({
  1. bool? def,
})

Implementation

bool asBool({bool? def}) {
  var value = this ?? def;
  return value.toString().toBool;
}