EventSchedulerBuilder class
A builder class for creating and configuring event schedulers.
This class provides a fluent interface for configuring events using the builder pattern. It allows for easy and readable configuration of all event parameters.
Example usage:
EventSchedulerBuilder()
.setEventKey('my_event')
.setTriggerType(TriggerType.time)
.setTriggerTime(DateTime.now().add(Duration(minutes: 5)))
.setRecurrenceInterval(Duration(minutes: 30))
.setOnEvent(() {
print('Event triggered!');
})
.build();
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
) → void - Builds and registers the event configuration.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setEndTime(
DateTime time) → EventSchedulerBuilder - Sets when the event should stop recurring.
-
setEventKey(
String key) → EventSchedulerBuilder - Sets the unique identifier for the event.
-
setMaxRecurrences(
int count) → EventSchedulerBuilder - Sets the maximum number of times an event can recur.
-
setOnEvent(
VoidCallback callback) → EventSchedulerBuilder - Sets the callback function for when the event is triggered.
-
setOnStateUpdate(
dynamic callback(bool)) → EventSchedulerBuilder - Sets the callback function for state updates.
-
setRecurrenceCount(
int count) → EventSchedulerBuilder - Sets the number of times an event should recur.
-
setRecurrenceInterval(
Duration interval) → EventSchedulerBuilder - Sets the interval between recurring events.
-
setRecurrenceOnEvent(
VoidCallback callback) → EventSchedulerBuilder - Sets the callback function for recurrence events.
-
setRecurrenceType(
RecurrenceType type) → EventSchedulerBuilder - Sets the type of recurrence for the event.
-
setTriggerCount(
int count) → EventSchedulerBuilder - Sets the trigger count for count-based triggers.
-
setTriggerTime(
DateTime time) → EventSchedulerBuilder - Sets the trigger time for time-based triggers.
-
setTriggerType(
TriggerType type) → EventSchedulerBuilder - Sets the type of trigger for the event.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited