visitFunctionDeclaration method

  1. @override
bool visitFunctionDeclaration (
  1. FunctionDeclaration node
)
override

Implementation

@override
bool visitFunctionDeclaration(FunctionDeclaration 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.functionExpression, _oldNode)) {
    node.functionExpression = _newNode as FunctionExpression;
    return true;
  }
  return visitAnnotatedNode(node);
}