RandomRecurrentTrigger constructor
RandomRecurrentTrigger({})
Creates a RandomRecurrentTrigger.
minNumberOfTriggers and maxNumberOfTriggers specify the range of
the random number of triggers (e.g., between 3 and 8 times per day).
startTime and endTime specify the period within a day the triggers
take place (default is between 08:00 and 20:00). startTime must be
before endTime.
Implementation
RandomRecurrentTrigger({
this.minNumberOfTriggers = 0,
this.maxNumberOfTriggers = 1,
this.startTime = const TimeOfDay(hour: 8),
this.endTime = const TimeOfDay(hour: 20),
}) : super() {
assert(startTime.isBefore(endTime), 'startTime must be before endTime with a 24 hour period.');
}