ClassDefinition class

Define a Dart class parsed from GraphQL type.

Inheritance
Mixed-in types

Constructors

ClassDefinition({required Name name, Iterable<ClassProperty> properties = const [], Name? extension, Iterable<String> implementations = const [], Iterable<FragmentName> mixins = const [], Map<String, Name> factoryPossibilities = const {}, ClassPropertyName? typeNameField, bool isInput = false})
Instantiate a class definition.

Properties

extension Name?
The type this class extends from, or null.
final
factoryPossibilities Map<String, Name>
The types possibilities (GraphQL type -> class name) the class implements, if it's part of an union type or interface.
final
hashCode int
The hash code for this object.
no setterinherited
implementations Iterable<String>
The types this class implements.
final
isInput bool
Whether this is an input object or not.
final
mixins Iterable<FragmentName>
The types this class mixins.
final
name Name
The definition name.
finalinherited
namedProps Map<String, Object?>
no setteroverride
properties Iterable<ClassProperty>
The properties (fields) of the class.
final
props List
The list of properties that will be used to determine whether two instances are equal.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
typeNameField ClassPropertyName
The field name used to resolve this class type.
final

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