checkNullableBool static method

bool? checkNullableBool(
  1. dynamic value,
  2. String fieldName
)

Implementation

static bool? checkNullableBool(dynamic value, String fieldName) {
  if (value == null) return null;
  if (value is bool) return value;
  throw FormatException("Invalid type for '$fieldName': expected bool");
}