withNullability method

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

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

Implementation

@override
FunctionType withNullability(bool isNullable) {
  if (this.isNullable == isNullable) {
    return this;
  }
  return FunctionType(
    isNullable: isNullable,
    parameters: parameters,
    typeParameters: typeParameters,
    returnType: returnType,
  );
}