Field class

A Field provides information about a Dart language field or variable.

Implemented types


Field({String? name, ObjRef? owner, InstanceRef? declaredType, bool? isConst, bool? isFinal, bool? isStatic, required String id, SourceLocation? location, dynamic staticValue})


classRef ClassRef?
If an object is allocated in the Dart heap, it will have a corresponding class object.
getter/setter pairinherited
declaredType InstanceRef?
The declared type of this field.
getter/setter pairoverride
fixedId bool?
Provided and set to true if the id of an Object is fixed. If true, the id of an Object is guaranteed not to change or expire. The object may, however, still be Collected.
getter/setter pairinherited
hashCode int
The hash code for this object.
no setteroverride
id String?
A unique identifier for an Object. Passed to the getObject RPC to reload this Object.
getter/setter pairinherited
isConst bool?
Is this field const?
getter/setter pairoverride
isFinal bool?
Is this field final?
getter/setter pairoverride
isStatic bool?
Is this field static?
getter/setter pairoverride
json Map<String, dynamic>?
getter/setter pairinherited
location SourceLocation?
The location of this field in the source code.
getter/setter pairoverride
name String?
The name of this field.
getter/setter pairoverride
owner ObjRef?
The owner of this field, which can be either a Library or a Class.
getter/setter pairoverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int?
The size of this object in the heap.
getter/setter pairinherited
staticValue ↔ dynamic
The value of this field, if the field is static. If uninitialized, this will take the value of an uninitialized Sentinel.
getter/setter pair
type String
no setteroverride


noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
toJson() Map<String, dynamic>
toString() String
A string representation of this object.


operator ==(Object other) bool
The equality operator.

Static Methods

parse(Map<String, dynamic>? json) Field?