Repeat constructor

Repeat({
  1. Duration? boundsDuration,
  2. Range? boundsRange,
  3. Period? boundsPeriod,
  4. int? count,
  5. int? countMax,
  6. num? duration,
  7. num? durationMax,
  8. String? durationUnit,
  9. int? frequency,
  10. int? frequencyMax,
  11. num? period,
  12. num? periodMax,
  13. String? periodUnit,
  14. FixedList<String>? dayOfWeek,
  15. FixedList<Time>? timeOfDay,
  16. FixedList<String>? when,
  17. int? offset,
})

Constructs a new Repeat.

Implementation

Repeat({
  Duration? boundsDuration,
  Range? boundsRange,
  Period? boundsPeriod,
  int? count,
  int? countMax,
  num? duration,
  num? durationMax,
  String? durationUnit,
  int? frequency,
  int? frequencyMax,
  num? period,
  num? periodMax,
  String? periodUnit,
  FixedList<String>? dayOfWeek,
  FixedList<Time>? timeOfDay,
  FixedList<String>? when,
  int? offset,
}) : this.fromJson(
        JsonObject({
          if (boundsDuration != null)
            boundsDurationField.name:
                JsonNumber(boundsDuration.inMicroseconds),
          if (boundsRange != null) boundsRangeField.name: boundsRange.json,
          if (boundsPeriod != null) boundsPeriodField.name: boundsPeriod.json,
          if (count != null) countField.name: JsonNumber(count),
          if (countMax != null) countMaxField.name: JsonNumber(countMax),
          if (duration != null) durationField.name: JsonNumber(duration),
          if (durationMax != null)
            durationMaxField.name: JsonNumber(durationMax),
          if (durationUnit != null)
            durationUnitField.name: JsonString(durationUnit),
          if (frequency != null) frequencyField.name: JsonNumber(frequency),
          if (frequencyMax != null)
            frequencyMaxField.name: JsonNumber(frequencyMax),
          if (period != null) periodField.name: JsonNumber(period),
          if (periodMax != null) periodMaxField.name: JsonNumber(periodMax),
          if (periodUnit != null)
            periodUnitField.name: JsonString(periodUnit),
          if (dayOfWeek != null)
            dayOfWeekField.name:
                JsonArray.unmodifiable(dayOfWeek.map(JsonString.new)),
          if (timeOfDay != null)
            timeOfDayField.name: JsonArray.unmodifiable(
              timeOfDay.map((e) => JsonString(e.toString())),
            ),
          if (when != null)
            whenField.name: JsonArray.unmodifiable(when.map(JsonString.new)),
          if (offset != null) offsetField.name: JsonNumber(offset),
        }),
      );