FieldRef class Null safety

An FieldRef is a reference to a Field.



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


declaredType InstanceRef?
The declared type of this field.
read / write
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.
@optional, read / write, inherited
hashCode int
The hash code for this object.
read-only, override
id String?
A unique identifier for an Object. Passed to the getObject RPC to load this Object.
read / write, inherited
isConst bool?
Is this field const?
read / write
isFinal bool?
Is this field final?
read / write
isStatic bool?
Is this field static?
read / write
json Map<String, dynamic>?
read / write, inherited
location SourceLocation?
The location of this field in the source code.
@optional, read / write
name String?
The name of this field.
read / write
owner ObjRef?
The owner of this field, which can be either a Library or a Class.
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
type String
read-only, override


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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) FieldRef?