withNullability method

  1. @override
InterfaceTypeImpl withNullability(
  1. bool isNullable
)
override

Returns a copy of this interface type with the specified nullability.

Implementation

@override
InterfaceTypeImpl withNullability(bool isNullable) {
  if (this.isNullable == isNullable) {
    return this;
  }
  return InterfaceTypeImpl(
    name,
    declarationRef,
    resolver,
    isNullable: isNullable,
    typeArguments: typeArguments,
  );
}