period property

  1. @override
Duration get period
override

The period between the recurring samplings.

Implementation

@override
Duration get period {
  switch (type) {
    case RecurrentType.daily:
      return Duration(days: separationCount + 1);
    case RecurrentType.weekly:
      return Duration(days: (separationCount + 1) * daysPerWeek);
    case RecurrentType.monthly:
      // @TODO - this is not a correct model...
      // the period in monthly recurring triggers is not fixed, but depends on the specific month(s)
      // but the current implementation of the [RecurrentScheduledTriggerExecutor] expects a fixed period
      return Duration(days: (separationCount + 1) * daysPerMonth);
  }
}
set period (Duration _period)
inherited

The period (reciprocal of frequency) of sampling.

Implementation

Duration period;