isExplicitlyNullable property

bool get isExplicitlyNullable

Whether the type is an opted-in library where it explicitly nullable.

Implementation

bool get isExplicitlyNullable {
  var type = this;
  if (type == null || type.isDynamic) {
    return false;
  }
  if (_isFutureOrWithExplicitlyNullableValue) {
    return true;
  }
  return type.nullabilitySuffix == NullabilitySuffix.question;
}