toBooleanWithDefault method

bool toBooleanWithDefault (dynamic value, bool defaultValue)

Converts value into boolean or returns default value when conversion is not possible

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

See [toNullableBoolean]