period property

Duration get period

The period between the recurring samplings.

Implementation

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);
  }
}