Repeat constructor
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,
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),
}),
);