toBoolean static method

bool toBoolean(
  1. dynamic value
)

Converts value into boolean or returns false when conversion is not possible.

  • value the value to convert. Returns boolean value or false when conversion is not supported.

See toBooleanWithDefault

Implementation

static bool toBoolean(value) {
  return BooleanConverter.toBooleanWithDefault(value, false);
}