readBool method

bool readBool(
  1. String key, {
  2. bool? defaultValue,
})

Reads a bool from this Pickle.

This will throw ArgumentError if the key is empty and no default value has been provided or PickleTypeError if the associated value is of a different type than expected.

Implementation

bool readBool(final String key, {final bool? defaultValue}) =>
    _read(key, defaultValue: defaultValue);