OmegaFlowContext class

Context the flow receives in OmegaFlow.onEvent and OmegaFlow.onIntent: the triggering event or intent and memory.

Why use it: In onIntent you read intent and memory; in onEvent you read event and memory. Memory persists across calls.

Example: void onIntent(OmegaFlowContext ctx) { final creds = ctx.intent?.payloadAs<LoginCredentials>(); ctx.memory["pending"] = true; ... }

Constructors

OmegaFlowContext({OmegaEvent? event, OmegaIntent? intent, required Map<String, dynamic> memory})
const

Properties

event OmegaEvent?
Event that triggered onEvent. Null in onIntent.
final
hashCode int
The hash code for this object.
no setterinherited
intent OmegaIntent?
Intent that triggered onIntent. Null in onEvent.
final
memory Map<String, dynamic>
Flow memory. Shared between onEvent and onIntent; included in the snapshot.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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