asBool property

bool asBool

Asserts that value exists and is a boolean and returns it.

asBoolOr may be used to provide a default value instead of rejecting the request if value doesn't exist.

Implementation

bool get asBool => _getTyped('a boolean', (value) => value is bool);