getBoolean method

bool getBoolean (String key)

Gets a property's value as a boolean value. Returns true if the value exists, and is either true or a nonzero number.

  • Parameter key: The key.
  • Returns: The Bool value.

Implementation

bool getBoolean(String key) {
  Object _result = getValue(key);

  if (_result is num) {
    return _result != 0;
  }

  return _result is bool ? _result : false;
}