ZoneField<T extends Object> class

A field value based in Zones. This is similar to ThreadLocal in Java, but based in the current Zone or a passed contextZone.

Constructors

ZoneField(Zone parentZone)

Properties

contextZone → Zone
Returns the current context zone.
no setter
hashCode → int
The hash code for this object.
no setterinherited
parentZone → Zone
The parent zone of all contextZones.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createContextZone({Map<Object?, Object?>? zoneValues}) → Zone
Creates a new contextZone to store values.
createSafeContextZone({ZoneSpecification? zoneSpecification, Map<Object?, Object?>? zoneValues, void handleUncaughtError(Object error, StackTrace stackTrace)?}) → Zone
Same as createContextZone handling Uncaught Errors. See ZoneSpecification.handleUncaughtError.
disposeContextZone(Zone contextZone) → void
Disposes the contextZone and any related value.
get([Zone? contextZone]) → T?
Gets the value associated with the contextZone.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove({Zone? contextZone}) → T?
Removes the value associated with the contextZone. See set.
set(T? value, {Zone? contextZone}) → T?
Sets the value associated with the contextZone.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited