VyuhEvent<T> class
Base class for all events in a Vyuh application.
Events represent discrete occurrences in the application that other components might be interested in. They can carry optional data and are automatically timestamped.
Example:
class UserLoggedInEvent extends VyuhEvent<UserData> {
UserLoggedInEvent({required UserData data})
: super(name: 'user.logged_in', data: data);
}
- Implementers
Constructors
- VyuhEvent.new({required String name, T? data})
Properties
- data → T?
-
Optional data associated with the event.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name of the event, used for identification and logging.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestamp → DateTime
-
When the event was created.
final
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