toBool static method
bool
toBool(
- dynamic object, {
- dynamic mapKey,
- int? listIndex,
- bool? defaultValue,
- ElementConverter<
bool> ? converter,
Converts object to bool using BoolOptions from ConvertConfig.
This conversion never throws. When parsing fails, it returns
defaultValue or false when defaultValue is null.
Implementation
static bool toBool(
dynamic object, {
dynamic mapKey,
int? listIndex,
bool? defaultValue,
ElementConverter<bool>? converter,
}) => ConvertObjectImpl.toBool(
object,
mapKey: mapKey,
listIndex: listIndex,
defaultValue: defaultValue,
converter: converter,
);