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 (authLoginSuccess →
auth.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;
}
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