RequestScope class

Per-request state container that lives in the current Zone.

Constructors

RequestScope(HttpRequest request)

Properties

attributes → Map<Object, Object?>
Open bag for extension packages that need per-request state without core having to know about them.
final
csrfToken ↔ String
CSRF token currently attached to this session, if any.
getter/setter pair
currentRoute ↔ String
Route-history state used by Response.back().
getter/setter pair
flashSessions → Map<String, dynamic>
Flash messages set via Response.back(key, msg) or session().
final
formData → Map<String, dynamic>
Old-input map used for form repopulation. Written by the request handler right after body extraction.
final
hashCode → int
The hash code for this object.
no setterinherited
previousRoute ↔ String
getter/setter pair
request → HttpRequest
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sessionData ↔ Map<String, dynamic>
Session snapshot for the current request. Populated by SessionManager.sessionStart and read by the session helpers.
getter/setter pair
sessionErrors → Map<String, dynamic>
Flash-style validation errors surfaced by the current request's validators; consumed by the view engine when rendering.
final
sessionId ↔ String?
Session id resolved from the request cookie. Cached so we don't re-scan request.cookies on every session helper call.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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