CodeEmitter class
Constructors
- CodeEmitter({ModelGenerator? modelGenerator, EnumGenerator? enumGenerator, ServiceGenerator? serviceGenerator})
-
const
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
-
buildBarrel(
ApiAst ast) → String - Returns a barrel file that re-exports both generated files.
-
buildModels(
ApiAst ast) → String -
Returns the content of
models.dartas a string. Useful for tests or in-memory generation. -
buildServices(
ApiAst ast) → String -
Returns the content of
services.dartas a string. -
emit(
ApiAst ast, String outputDir, {bool format = true, bool verbose = false}) → Future< EmitResult> -
Emits all files to
outputDir. -
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