Calendar constructor

const Calendar({
  1. Key? key,
  2. String type = "single",
  3. String title = "日期选择",
  4. Color? color,
  5. DateTime? minDate,
  6. DateTime? maxDate,
  7. dynamic defaultDate,
  8. double rowHeight = Style.calendarDayHeight,
  9. bool poppable = true,
  10. bool round = true,
  11. bool showMark = true,
  12. bool showConfirm = true,
  13. bool closeOnClickOverlay = true,
  14. String confirmText = "确定",
  15. double height = Style.calendarHeight,
  16. dynamic onSelect(
    1. dynamic date
    )?,
  17. dynamic onConfirm(
    1. dynamic date
    )?,
})

Implementation

const Calendar(
    {Key? key,
    this.type: "single",
    this.title: "日期选择",
    this.color,
    this.minDate,
    this.maxDate,
    this.defaultDate,
    this.rowHeight: Style.calendarDayHeight,
    this.poppable: true,
    this.round: true,
    this.showMark: true,
    this.showConfirm: true,
    this.closeOnClickOverlay: true,
    this.confirmText: "确定",
    this.height: Style.calendarHeight,
    this.onSelect,
    this.onConfirm})
    : assert(type == 'single' || type == 'range',
          "type must be single or range");