MaterialGanttChart class

A customizable Gantt Chart widget that displays tasks over a timeline.

This widget provides a graphical representation of tasks with start and end dates. It supports user interactions such as taps and hovers to provide more information about each task.

The chart can be customized using the provided style options.

Inheritance

Constructors

MaterialGanttChart({Key? key, required List<GanttData> data, required double width, required double height, GanttChartStyle style = const GanttChartStyle(), bool interactive = true, void onPointTap(GanttData)?, void onPointHover(GanttData)?, VoidCallback? onAnimationComplete})
Constructs a MaterialGanttChart widget.

Properties

data List<GanttData>
A list of Gantt data representing the tasks.
final
hashCode int
The hash code for this object.
no setterinherited
height double
The height of the Gantt chart.
final
interactive bool
Enables or disables interactive features (hovering and tapping).
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onAnimationComplete VoidCallback?
Callback function that is called when the animation completes.
final
onPointHover → void Function(GanttData)?
Callback function that is called when a point is hovered over.
final
onPointTap → void Function(GanttData)?
Callback function that is called when a point is tapped.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style GanttChartStyle
Style properties for customizing the appearance of the Gantt chart.
final
width double
The width of the Gantt chart.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<MaterialGanttChart>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited