OmegaIntentName class abstract
Contract for typed intent names (avoids magic strings and eases refactoring).
Implement this interface with an enum or class to define your app's known intents and use OmegaIntent.fromName when creating intents. You get autocomplete and the analyzer catches broken usages when you change the name.
Styles: (1) Enhanced enum with final String name when you need exact wire
ids per case (legacy / hand-maintained strings). (2) OmegaIntentNameDottedCamel —
one camelCase member per intent; wire is derived (navigateLogin → navigate.login,
ordersCreate → orders.create). Preferred for lib/omega/app_semantics.dart
and feature *_events.dart — matches example/lib/omega/app_semantics.dart and
omega init. (3) OmegaIntentNameEnumWire when the wire should equal Enum.name
as-is (no dots).
Preferred (AppIntent in app semantics):
enum AppIntent with OmegaIntentNameDottedCamel implements OmegaIntentName {
navigateLogin,
navigateHome,
}
// OmegaIntent.fromName(AppIntent.navigateLogin) → name "navigate.login"
Legacy (explicit wire per case — still valid API, not recommended for new apps):
enum LegacyIntent implements OmegaIntentName {
goLogin('navigate.login');
const LegacyIntent(this.name);
@override
final String name;
}
Constructors
Properties
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