OmegaNavigator class

Converts navigation intents ("navigate.xxx", "navigate.push.xxx") into Flutter push/pushReplacement.

Why use it: Flows navigate by emitting events; they don't have BuildContext. The channel emits "navigation.intent" or "navigate.home"; the manager calls handleIntent and this shows the screen.

Example: In the flow: channel.emit(OmegaEvent(..., name: "navigation.intent", payload: OmegaIntent.fromName(AppIntent.navigateHome, payload: user)));

navigatorKey must be assigned to MaterialApp.navigatorKey. intent.payload is passed as RouteSettings.arguments.

Constructors

OmegaNavigator()

Properties

hashCode int
The hash code for this object.
no setterinherited
Navigator key. Assign to MaterialApp.navigatorKey.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

handleIntent(OmegaIntent intent) → void
Performs navigation: "navigate.id" → pushReplacement; "navigate.push.id" → push. intent.payload → arguments.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onGenerateRoute(RouteSettings settings) Route?
Implementation for MaterialApp.onGenerateRoute. This allows using standard Navigator API (Navigator.pushNamed) with Omega routes.
registerRoute(OmegaRoute route) → void
Registers a screen. route.id is the destination in "navigate.{id}" or "navigate.push.{id}".
toString() String
A string representation of this object.
inherited

Operators

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