AstModifier class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
Static Methods
addElementToReturnListInFunction ({required String source , required FunctionDeclaration functionNode , required String elementSource , bool format = true })
→ String
addExport (String source , CompilationUnit unit , String exportPath , {bool format = true })
→ String
addFieldToClass ({required String source , required ClassDeclaration classNode , required String fieldSource , bool format = true })
→ String
addImport (String source , CompilationUnit unit , String importPath , {bool format = true })
→ String
addMethodToClass ({required String source , required ClassDeclaration classNode , required String methodSource , bool format = true })
→ String
addMethodToExtension ({required String source , required ExtensionDeclaration extensionNode , required String methodSource , bool format = true })
→ String
addStatementToFunction ({required String source , required FunctionDeclaration functionNode , required String statementSource , bool format = true })
→ String
format (String source )
→ String
removeElementFromReturnListInFunction ({required String source , required FunctionDeclaration functionNode , required String elementSource , bool format = true })
→ String
removeElementsFromReturnListInFunctionWhere ({required String source , required FunctionDeclaration functionNode , required bool matches (String elementSource ), bool format = true })
→ String
Removes every element of the function's returned list literal for which
matches returns true. Unlike removeElementFromReturnListInFunction ,
elements do not have to match a full source string exactly — this allows
replacing stale elements identified by a stable partial identity.
removeExport (String source , CompilationUnit unit , String exportPath , {bool format = true })
→ String
removeField ({required String source , required VariableDeclaration field , bool format = true })
→ String
removeImport (String source , CompilationUnit unit , String importPath , {bool format = true })
→ String
removeMethodFromClass ({required String source , required MethodDeclaration method , bool format = true })
→ String
removeStatement ({required String source , required List <Statement > statements , required String statementSource , bool format = true })
→ String
replaceConstructorInClass ({required String source , required ClassDeclaration classNode , required ConstructorDeclaration oldConstructor , required String constructorSource , bool format = true })
→ String
replaceFieldInClass ({required String source , required ClassDeclaration classNode , required VariableDeclaration oldField , required String fieldSource , bool format = true })
→ String
replaceMethodInClass ({required String source , required ClassDeclaration classNode , required MethodDeclaration oldMethod , required String methodSource , bool format = true })
→ String