CommandRepeatArray constructor

CommandRepeatArray({
  1. required bool isDay,
  2. bool monday = false,
  3. bool tuesday = false,
  4. bool wednesday = false,
  5. bool thursday = false,
  6. bool friday = false,
  7. bool saturday = false,
  8. bool sunday = false,
})

按周期循环 创建带周信息的对象

@param isDay 是否按天循环 @param monday 星期一 @param tuesday 星期二 @param wednesday 星期三 @param thursday 星期四 @param friday 星期五 @param saturday 星期六 @param sunday 星期日

Implementation

CommandRepeatArray(
    {required this.isDay,
    bool monday = false,
    bool tuesday = false,
    bool wednesday = false,
    bool thursday = false,
    bool friday = false,
    bool saturday = false,
    bool sunday = false}) {
  if (isDay) {
    this.monday = false;
    this.tuesday = false;
    this.wednesday = false;
    this.thursday = false;
    this.friday = false;
    this.saturday = false;
    this.sunday = false;
  } else {
    this.monday = monday;
    this.tuesday = tuesday;
    this.wednesday = wednesday;
    this.thursday = thursday;
    this.friday = friday;
    this.saturday = saturday;
    this.sunday = sunday;
  }
}