OmegaEventName class abstract

Contract for typed event names (avoids magic strings and eases refactoring).

Implement this interface with an enum or class to define your app's known events and use OmegaEvent.fromName when emitting. You get autocomplete and the analyzer catches broken usages when you change the name.

Styles: (1) Enhanced enum with explicit name per case (legacy). (2) OmegaEventNameDottedCamel — camelCase member → dotted wire (authLoginSuccessauth.login.success). Preferred for lib/omega/app_semantics.dart and feature *_events.dart — see example/lib/omega/app_semantics.dart. (3) OmegaEventNameEnumWire — wire equals Enum.name.

Preferred (AppEvent in app semantics):

enum AppEvent with OmegaEventNameDottedCamel implements OmegaEventName {
  navigationIntent,
  authLoginSuccess,
}

Legacy (explicit wire per case):

enum LegacyEvent implements OmegaEventName {
  authLoginSuccess('auth.login.success');
  const LegacyEvent(this.name);
  @override
  final String name;
}
Implementers

Constructors

OmegaEventName()

Properties

hashCode int
The hash code for this object.
no setterinherited
name String
Event name (e.g. "auth.login.success").
no setter
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