GanttChartView constructor

GanttChartView({
  1. Key? key,
  2. required List<GanttEventBase> events,
  3. required DateTime startDate,
  4. Duration? maxDuration,
  5. double stickyAreaWidth = 200,
  6. Widget stickyAreaEventBuilder(
    1. BuildContext context,
    2. int eventIndex,
    3. GanttEventBase event,
    4. Color eventColor,
    )?,
  7. WidgetBuilder? stickyAreaDayBuilder,
  8. WidgetBuilder? stickyAreaWeekBuilder,
  9. bool showDays = true,
  10. double dayWidth = 30,
  11. double eventHeight = 30,
  12. double weekHeaderHeight = 30,
  13. double dayHeaderHeight = 40,
  14. Set<WeekDay> weekEnds = const {WeekDay.friday, WeekDay.saturday},
  15. Widget dayHeaderBuilder(
    1. BuildContext context,
    2. DateTime date,
    3. bool isHoliday
    )?,
  16. Widget weekHeaderBuilder(
    1. BuildContext context,
    2. DateTime weekDate
    )?,
  17. IsExtraHolidayFunc? isExtraHoliday,
  18. Widget eventRowPerWeekBuilder(
    1. BuildContext context,
    2. DateTime eventStart,
    3. DateTime eventEnd,
    4. double dayWidth,
    5. double weekWidth,
    6. DateTime weekStartDate,
    7. bool isHoliday(
      1. BuildContext,
      2. DateTime
      ),
    8. GanttEventBase event,
    9. Color eventColor,
    )?,
  19. WeekDay startOfTheWeek = WeekDay.sunday,
  20. EventCellBuilderFunction? eventCellPerDayBuilder,
  21. Color? holidayColor,
  22. bool showStickyArea = true,
  23. ScrollController? scrollController,
  24. ScrollPhysics? scrollPhysics,
})

Implementation

GanttChartView({
  Key? key,
  required this.events,
  required this.startDate,
  this.maxDuration,
  this.stickyAreaWidth = 200,
  this.stickyAreaEventBuilder,
  this.stickyAreaDayBuilder,
  this.stickyAreaWeekBuilder,
  this.showDays = true,
  this.dayWidth = 30,
  this.eventHeight = 30,
  this.weekHeaderHeight = 30,
  this.dayHeaderHeight = 40,
  this.weekEnds = const {WeekDay.friday, WeekDay.saturday},
  this.dayHeaderBuilder,
  this.weekHeaderBuilder,
  this.isExtraHoliday,
  this.eventRowPerWeekBuilder,
  this.startOfTheWeek = WeekDay.sunday,
  this.eventCellPerDayBuilder,
  this.holidayColor,
  this.showStickyArea = true,
  this.scrollController,
  this.scrollPhysics,
})  : assert(
        !weekEnds.contains(startOfTheWeek),
        'startOfTheWeek must be a work day',
      ),
      super(key: key);