JsonModelGenerator class

Inheritance

Constructors

JsonModelGenerator()
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
typeChecker TypeChecker
read-only, inherited

Methods

generate(LibraryReader library, BuildStep buildStep) FutureOr<String>
Generates Dart code for an input Dart library. [...]
inherited
generateClass(BuildContext ctx, LibraryBuilder file, ConstantReader annotation) → void
Generate an extended model class.
generateConstructor(BuildContext ctx, ClassBuilder clazz, LibraryBuilder file) → void
Generate a constructor with named parameters.
generateCopyWithMethod(BuildContext ctx, ClassBuilder clazz, LibraryBuilder file) → void
Generate a copyWith method.
generateEqualsOperator(BuildContext ctx, ClassBuilder clazz, LibraryBuilder file) → void
generateForAnnotatedElement(Element element, ConstantReader annotation, BuildStep buildStep) Future<String>
Implement to return source code to generate for element. [...]
override
generateHashCode(BuildContext ctx, ClassBuilder clazz) → void
generateToString(BuildContext ctx, ClassBuilder clazz) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
shouldBeConstant(BuildContext ctx) bool
toString() String
Returns a string representation of this object.
inherited

Operators

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

Static Methods

generateComparator(DartType type) String Function(String, String)
generateEquality(DartType type, [bool nullable = false]) String