setters method
Implementation
@override
Map<String, Function> setters() {
return {
'dayLabels': (List<dynamic> dayLabels) =>
controller.dayLabels = getDayLabels(dayLabels),
'paddingBetweenDays': (dynamic padding) => controller.padding =
EdgeInsets.fromLTRB(0, 0, 0, Utils.getDouble(padding, fallback: 2.0)),
'slotWidth': (dynamic width) => controller.slotWidth =
Utils.getDouble(width, fallback: controller.slotWidth),
'slotHeight': (dynamic height) => controller.slotHeight =
Utils.getDouble(height, fallback: controller.slotHeight),
'gapBetweenSlots': (dynamic gap) =>
controller.gapX = Utils.getDouble(gap, fallback: controller.gapX),
'selectedSlotColor': (dynamic color) => controller.selectedColor =
Utils.getColor(color) ?? controller.selectedColor,
'unselectedSlotColor': (dynamic color) => controller.unselectedColor =
Utils.getColor(color) ?? controller.unselectedColor,
'slotInMinutes': (dynamic value) =>
controller.slotInMinutes = Utils.getInt(value, fallback: 30),
'displayDayLabels': (dynamic value) => controller.displayDayLabels =
Utils.getBool(value, fallback: controller.displayDayLabels),
'dayLabelStyles': (dynamic value) => controller.dayLabelStyles =
Utils.getMap(value) == null ? {} : Utils.getMap(value)!,
'displayVerticalDividers': (dynamic value) => controller
.displayVerticalDividers =
Utils.getBool(value, fallback: controller.displayVerticalDividers),
'numberOfSlotsForEachVerticalDivider': (dynamic value) =>
controller.numberOfSlotsForEachVerticalDivider = Utils.getInt(value,
fallback: controller.numberOfSlotsForEachVerticalDivider),
'dayLabelBoxWidth': (dynamic value) => controller.dayLabelBoxWidth =
Utils.getDouble(value, fallback: controller.dayLabelBoxWidth),
'dayLabelBoxHeight': (dynamic value) => controller.dayLabelBoxHeight =
Utils.getDouble(value, fallback: controller.dayLabelBoxHeight),
'gapToLeaveForDivider': (dynamic value) =>
controller.gapToLeaveForDivider =
Utils.getDouble(value, fallback: controller.gapToLeaveForDivider),
'verticalDividerLabels': (dynamic value) =>
controller.verticalDividerLabels = (value != null)
? Utils.getListOfStrings(value)!
: controller.verticalDividerLabels,
};
}