parseBool method

bool parseBool()

Implementation

bool parseBool() {
  var value = this.toLowerCase();
  if (value == 'true' || value == '1') {
    return true;
  } else if (value == 'false' || value == '0') {
    return false;
  }

  throw '"$this" can not be parsed to boolean.';
}