CodeGeneratorHelper class

Helper utility to safely modify Dart source code files without duplicating classes, functions/methods, or imports.

Constructors

CodeGeneratorHelper()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

addClassIfMissing(String filePath, String className, String classTemplate) → void
Safely adds a class to the file if it doesn't already exist. If the file does not exist, it will create it.
addImportIfMissing(String filePath, String importLine) → void
Safely adds an import statement to the top of the file if it doesn't already exist.
addMethodIfMissing(String filePath, String className, String methodName, String methodTemplate) → void
Safely adds a method to a specific class in the file if it doesn't already exist.