FieldDescriptorBase class

Enhanced information over a FieldElement

Implementers

Constructors

FieldDescriptorBase({required String displayName, required String name, required bool isFinal, required bool isLate, required bool hasInitializer, required DartType fieldElementType})
FieldDescriptorBase.fromFieldElement(FieldElement fieldElement)

Properties

displayName → String
The displayName of the field element.
final
fieldElementType → DartType
Returns the type of the field element
final
fieldElementTypeName → String
Returns the name of the type of the field element First try to get the element name directly, in order to avoid the dynamic suffix when class has a generic type.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasInitializer → bool
final
isFinal → bool
final
isLate → bool
final
isNullable → bool
Returns true when the field is a nullable type
no setter
isRepeated → bool
Returns true when the field is a list
no setter
itemType → DartType
Returns the list element type when the field is a list and returns the field element when otherwise
no setter
iterableParameterType → DartType?
no setter
listParameterType → DartType?
When the field element is a List, returns the type of List element
no setter
name → String
final
nullSuffix → String
Returns the ? character when the field is a nullable type. Otherwise, returns an empty string
no setter
parameterType → DartType
When the field element type is a generic, returns the first type parameter type
no setter
parameterTypeIsEnum → bool
When the field element type is a generic, returns a value indicating whether the first type parameter is an enum
no setter
parameterTypeName → String
When the field element type is a generic, returns the first type parameter type name
no setter
pascalName → String
Returns the name of the field using a Pascal Case
no setter
requiredPrefix → String
Returns an empty string when the field is a nullable, otherwise returns 'required'
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
setParameterType → DartType?
no setter
typeIsEnum → bool
Returns true when the field is an enum
no setter
valueName → String
Gets a non-nullable value representation of the field.
no setter

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