GanttChartView constructor
GanttChartView({
- Key? key,
- required List<
GanttEventBase> events, - required DateTime startDate,
- Duration? maxDuration,
- double stickyAreaWidth = 200,
- Widget stickyAreaEventBuilder(
- BuildContext context,
- int eventIndex,
- GanttEventBase event,
- Color eventColor,
- WidgetBuilder? stickyAreaDayBuilder,
- WidgetBuilder? stickyAreaWeekBuilder,
- bool showDays = true,
- double dayWidth = 30,
- double eventHeight = 30,
- double weekHeaderHeight = 30,
- double dayHeaderHeight = 40,
- Set<
WeekDay> weekEnds = const {WeekDay.friday, WeekDay.saturday}, - Widget dayHeaderBuilder(
- BuildContext context,
- DateTime date,
- bool isHoliday
- Widget weekHeaderBuilder(
- BuildContext context,
- DateTime weekDate
- IsExtraHolidayFunc? isExtraHoliday,
- Widget eventRowPerWeekBuilder(
- BuildContext context,
- DateTime eventStart,
- DateTime eventEnd,
- double dayWidth,
- double weekWidth,
- DateTime weekStartDate,
- bool isHoliday(),
- GanttEventBase event,
- Color eventColor,
- WeekDay startOfTheWeek = WeekDay.sunday,
- EventCellBuilderFunction? eventCellPerDayBuilder,
- Color? holidayColor,
- bool showStickyArea = true,
- ScrollController? scrollController,
- 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);