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.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
entry<
T extends ContextEntry> ([T? defaultValue]) → T? -
Retrieves an entry from Context by type
T
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
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