readBool method

bool readBool(
  1. dynamic source,
  2. dynamic key, {
  3. bool defaultValue = false,
})

Reads a boolean value from the source, and if not found, returns the provided defaultValue.

Implementation

bool readBool(source, key, {bool defaultValue = false}) {
  return tryReadBool(source, key) ?? defaultValue;
}