visitConstructorDeclaration method

  1. @override
bool visitConstructorDeclaration (
  1. ConstructorDeclaration node
)
override

Implementation

@override
bool visitConstructorDeclaration(ConstructorDeclaration node) {
  if (identical(node.returnType, _oldNode)) {
    node.returnType = _newNode as Identifier;
    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.redirectedConstructor, _oldNode)) {
    node.redirectedConstructor = _newNode as ConstructorName;
    return true;
  } else if (identical(node.body, _oldNode)) {
    node.body = _newNode as FunctionBody;
    return true;
  } else if (_replaceInList(node.initializers)) {
    return true;
  }
  return visitAnnotatedNode(node);
}