OmegaFlowManager class
Constructors
- OmegaFlowManager({required OmegaChannel channel})
Properties
- activeFlowId ↔ String?
-
Id of the main flow (the one last activated with switchTo). Useful for snapshot and restore.
getter/setter pair
- channel → OmegaChannel
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
registeredFlowIds
→ Iterable<
String> -
Ids of all registered flows (same strings as OmegaFlow.id). Useful for debugging.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
activate(
String id) → bool -
Activates the flow
idwithout pausing others. Multiple flows can be running and all receive intents. -
activateExclusive(
String id) → void -
clearIntentHandlers(
) → void - Removes all intent handlers (e.g. in tests or hot-restart scenarios).
-
dispose(
) → void - Cancels subscriptions (e.g. navigation). Call when closing the app.
-
end(
String id) → void -
endAll(
) → void -
getAppSnapshot(
) → OmegaAppSnapshot - Snapshot of app state (active flow + all flows). For save/restore on close/open.
-
getFlow(
String id) → OmegaFlow? -
Returns the flow registered with
id. Use so the UI can listen to itsexpressions(e.g. flow.expressions.listen(...)). -
getFlowFlexible(
String id) → OmegaFlow? -
Like getFlow, but also finds a flow when
idmatches a registered key ignoring ASCII case (e.g. routeUserInterfacevs OmegaFlowIdEnumWireuserInterface). -
getFlowSnapshot(
String id) → OmegaFlowSnapshot? - Snapshot of a flow by id. For debugging or per-flow persistence.
-
getSnapshots(
) → List< OmegaFlowSnapshot> - List of snapshots for all flows. For inspection or persistence.
-
handleIntent(
OmegaIntent intent) → void -
Sends the
intentto registered handlers (if any), then to all flows that are running. -
handleTypedIntent<
T extends OmegaTypedIntent> (T intent) → void -
Sends a strongly-typed intent:
intentsupplies the wire name and is also the OmegaIntent.payload (same object). In flows use OmegaIntentTypedPayloadExtension.typedPayloadAs. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
String id) → void -
registerFlow(
OmegaFlow flow) → void - Registers a flow so it can be activated and receive intents. Call at bootstrap (omega_setup).
-
registerIntentHandler(
{required String intentName, required OmegaIntentHandler handler, bool consumeIntent = false}) → void -
Registers a lightweight
handlerinvoked when handleIntent receives an intent whose OmegaIntent.name equalsintentName. -
restoreFromSnapshot(
OmegaAppSnapshot snapshot) → void - Restores each flow's memory and activates the flow that was active. Call when opening the app after loading the snapshot.
-
sleep(
String id) → void -
switchTo(
String id) → bool -
Activates the flow
idand pauses the rest. Only one "main" flow receives intents. -
toString(
) → String -
A string representation of this object.
inherited
- Connects the channel to the navigator: when "navigation.intent" or "navigate.xxx" is emitted, the navigator does push/pushReplacement.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited