asBool method

bool asBool([
  1. bool? defaultValue
])

If object is bool then return it otherwise throw FormatException

Implementation

bool asBool([bool? defaultValue]) {
  return _getValue<bool>(defaultValue);
}