Context class Null safety

A Context is a data structure which holds the captured variables for some closure.

Implemented types


Context({required int? length, required List<ContextElement>? variables, required String id, ContextRef? parent})


classRef ClassRef?
If an object is allocated in the Dart heap, it will have a corresponding class object.
@optional, read / write, inherited
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 reload this Object.
read / write, inherited
json Map<String, dynamic>?
read / write, inherited
length int?
The number of variables in this context.
read / write, override
parent ContextRef?
The enclosing context for this context.
@optional, read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size int?
The size of this object in the heap.
@optional, read / write, inherited
type String
read-only, override
variables List<ContextElement>?
The variables in this context object.
read / write


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) Context?