toBoolean static method

bool toBoolean(
  1. dynamic d,
  2. bool def
)

Converts to not-nullable boolean

Implementation

static bool toBoolean(dynamic d, bool def) {
  return toBooleanN(d) ?? def;
}