RandomRecurrentTrigger constructor
RandomRecurrentTrigger({})
Create a RandomRecurrentTrigger.
minNumberOfTriggers and maxNumberOfTriggers specified the range of
the random samples (e.g., between 3 and 8 times pr. day).
startTime and endTime specified the period within a day the sampling
should take place (default is between 08:00 and 20:00).
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.',
);
}