visitMethodDeclaration method

  1. @override
bool visitMethodDeclaration (MethodDeclaration node)
override

Implementation

@override
bool visitMethodDeclaration(MethodDeclaration node) {
  if (identical(node.returnType, _oldNode)) {
    node.returnType = _newNode as TypeAnnotation;
    return true;
  } else if (identical(node.name, _oldNode)) {
    node.name = _newNode as SimpleIdentifier;
    return true;
  } else if (identical(node.parameters, _oldNode)) {
    node.parameters = _newNode as FormalParameterList;
    return true;
  } else if (identical(node.body, _oldNode)) {
    node.body = _newNode as FunctionBody;
    return true;
  }
  return visitAnnotatedNode(node);
}