setOnEvent method
Sets the callback function for when the event is triggered.
This is a required parameter and must be set before building. The callback will be called when the event triggers.
Implementation
EventSchedulerBuilder setOnEvent(VoidCallback callback) {
_onEvent = callback;
return this;
}