Context class

A Context to be passed along with a Request.

This implementation relies on Object.runtimeType. Context entries appear only once per type.

Annotations
  • @immutable

Constructors

Context()
Create an empty context. [...]
const
Context.fromList(List<ContextEntry> entries)
Creates a context from a list of entries. [...]
Context.fromMap(Map<Type, ContextEntry> context)
Creates a context from initial values represented as a map [...]
factory

Properties

hashCode int
The hash code for this object. [...]
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

entry<T extends ContextEntry>([T defaultValue]) → T
Retrieves an entry from Context by type T. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited
updateEntry<T extends ContextEntry>(ContextUpdater<T> update) Context
Create a Context by updating entry of type T
withEntry<T extends ContextEntry>(T entry) Context
Create a Context with entry added to the existing entries.

Operators

operator ==(Object o) bool
The equality operator. [...]
override