addChangeMethodSignature method

void addChangeMethodSignature(
  1. MethodBuilder methodBuilder
)

Adds the change method signature to the MethodBuilder.

Implementation

void addChangeMethodSignature(final MethodBuilder methodBuilder) {
  methodBuilder
    ..annotations.add(overrideAnnotationExpression)
    ..returns = refer(_changeMethod.returnType
        .getDisplayStringCompat(withNullability: false))
    ..name = _changeMethod.name
    ..requiredParameters.add(_generateParameter());

  if (_changeMethod.requiresAsyncModifier) {
    methodBuilder..modifier = MethodModifier.async;
  }
}