Field class Null safety

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

Inheritance
Implemented types

Constructors

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

Properties

classRef ClassRef?
If an object is allocated in the Dart heap, it will have a corresponding class object.
optional">@optionalread / writeinherited
declaredType InstanceRef?
The declared type of this field.
read / writeoverride
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">@optionalread / writeinherited
hashCode int
The hash code for this object.
read-onlyoverride
id String?
A unique identifier for an Object. Passed to the getObject RPC to reload this Object.
read / writeinherited
isConst bool?
Is this field const?
read / writeoverride
isFinal bool?
Is this field final?
read / writeoverride
isStatic bool?
Is this field static?
read / writeoverride
json Map<String, dynamic>?
read / writeinherited
location SourceLocation?
The location of this field in the source code.
optional">@optionalread / writeoverride
name String?
The name of this field.
read / writeoverride
owner ObjRef?
The owner of this field, which can be either a Library or a Class.
read / writeoverride
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
size int?
The size of this object in the heap.
optional">@optionalread / writeinherited
staticValue ↔ dynamic
The value of this field, if the field is static. If uninitialized, this will take the value of an uninitialized Sentinel.
optional">@optionalread / write
type String
read-onlyoverride

Methods

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

Operators

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

Static Methods

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