TimelineView class
甘特图风格的水平时间线视图
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TimelineView
Constructors
-
TimelineView({Key? key, required List<
CalendarEvent> events, required DateTime startDate, required DateTime endDate, List<String> ? trackLabels, double dayWidth = 40, double trackHeight = 56, ValueChanged<CalendarEvent> ? onEventTap, ValueChanged<DateTime> ? onDateTap}) -
const
Properties
- dayWidth → double
-
每天对应的像素宽度
final
- endDate → DateTime
-
时间线结束日期
final
-
events
→ List<
CalendarEvent> -
事件列表
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onDateTap
→ ValueChanged<
DateTime> ? -
点击日期回调
final
-
onEventTap
→ ValueChanged<
CalendarEvent> ? -
点击事件回调
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startDate → DateTime
-
时间线起始日期
final
- trackHeight → double
-
每个轨道的高度
final
-
trackLabels
→ List<
String> ? -
轨道分类标签(按 category 分组事件)
如果为空,按事件的 createdBy 或自动分组
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< TimelineView> -
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