toBooleanN static method

bool? toBooleanN(
  1. dynamic d
)

Converts to nullable boolean

Implementation

static bool? toBooleanN(dynamic d) {
  if (d is bool) {
    return d;
  }
  if (d is String) {
    return d.toLowerCase() == 'true';
  }
  return null;
}