$bool method

bool $bool(
  1. Object? value
)

Maps a value to a boolean.

(🚨) If the value is not a boolean, it will be converted to false.

Implementation

bool $bool(Object? value) => bool.tryParse('$value') ?? false;