toBooleanWithDefault method

bool toBooleanWithDefault (
  1. dynamic value,
  2. 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]