FieldDefinition class

Parsed field declaration.

Annotations
  • @immutable

Constructors

FieldDefinition({required String name, required String type, required bool isList, required bool isNullable, required List<FieldAttribute> attributes, int? line, int? column})
Creates a field definition.
const

Properties

attributes → List<FieldAttribute>
Field-level attributes such as @id or @relation.
final
column → int?
One-based source column where the field appears, if known.
final
databaseName → String
Database column name after applying @map, if present.
no setter
hashCode → int
The hash code for this object.
no setterinherited
isId → bool
Whether the field declares @id.
no setter
isIgnored → bool
Whether this field is excluded with @ignore.
no setter
isList → bool
Whether the field is declared as a list.
final
isNullable → bool
Whether the field is nullable.
final
isScalar → bool
Whether this field uses a known scalar type.
no setter
isUnique → bool
Whether the field declares @unique.
no setter
isUpdatedAt → bool
Whether the field declares @updatedAt.
no setter
line → int?
One-based source line where the field appears, if known.
final
name → String
Field name from the schema.
final
nativeTypeAttribute → FieldAttribute?
Provider-specific native type attribute such as @db.Text.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
Scalar, enum, or relation target type.
final

Methods

attribute(String name) → FieldAttribute?
Finds the first field-level attribute named name.
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