AvailableTime constructor

AvailableTime({
  1. FixedList<String>? daysOfWeek,
  2. Time? availableStartTime,
  3. Time? availableEndTime,
})

Constructs a new AvailableTime.

Implementation

AvailableTime({
  FixedList<String>? daysOfWeek,
  Time? availableStartTime,
  Time? availableEndTime,
}) : this.fromJson(
        JsonObject({
          if (daysOfWeek != null)
            daysOfWeekField.name: JsonArray.unmodifiable(
              daysOfWeek.map(JsonString.new),
            ),
          if (availableStartTime != null)
            availableStartTimeField.name:
                JsonString(availableStartTime.toString()),
          if (availableEndTime != null)
            availableEndTimeField.name:
                JsonString(availableEndTime.toString()),
        }),
      );