Event class Null safety

Event class. This is send back to the subscriber when an event is triggered, Subscriber can use the instance to retrieve the event data and other event related parameters. eventName is a mandatory parameter and will represent the current event.


Event(String eventName, [Object? eventData, Object? sender])
Default constructor for the Event class. eventName - the name of the event, used to identify the event. eventData - The data associated with the event. sender - Identifier to identify who is sending the event.


eventData Object?
If the event associated has any event data, then this object holds reference to it. Few events might not return data. Validate this field before using it.
eventName String
What event the emitter triggers. This is very useful to perform actions if you have single event handler to perform multiple operations.
handled bool
Getter to fetch handled information.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sender Object?
If this field is valid, then it shows who send the event to. This can be very useful while debugging systems with large event queues.


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]