SafaehTimeline<T> class

Vertical connected list for ordered stops, with optional reordering.

Each stop shows a numbered marker on a connector line. legBuilder can add a row under a stop (travel time, transit leg) that sits on the connector; return null for none. The package owns layout, drag feedback and semantics; the host owns stop content, order, and copy.

The list is a ReorderableListView with the host's keys, so only visible rows are built when shrinkWrap is false.

Inheritance

Constructors

SafaehTimeline({Key? key, required List<T> items, required Key itemKey(T item), required Widget itemBuilder(BuildContext context, T item, int index), Widget? legBuilder(BuildContext context, T item, int index)?, Widget markerBuilder(BuildContext context, T item, int index)?, void onReorder(int oldIndex, int newIndex)?, Widget reorderHandleBuilder(BuildContext context, T item, int index)?, double markerSize = 28, Color? markerColor, Color? onMarkerColor, Color? lineColor, EdgeInsets padding = EdgeInsets.zero, bool shrinkWrap = false, ScrollPhysics? physics, ScrollController? controller})
const

Properties

controller → ScrollController?
final
hashCode → int
The hash code for this object.
no setterinherited
itemBuilder → Widget Function(BuildContext context, T item, int index)
final
itemKey → Key Function(T item)
final
items → List<T>
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
legBuilder → Widget? Function(BuildContext context, T item, int index)?
Row shown between stop index and the next. Not called for the last stop.
final
lineColor → Color?
final
markerBuilder → Widget Function(BuildContext context, T item, int index)?
Replaces the numbered circle for a stop.
final
markerColor → Color?
final
markerSize → double
final
onMarkerColor → Color?
final
onReorder → void Function(int oldIndex, int newIndex)?
Called with the old and new index (already adjusted for removal).
final
padding → EdgeInsets
final
physics → ScrollPhysics?
final
reorderHandleBuilder → Widget Function(BuildContext context, T item, int index)?
Drag handle for a stop. Defaults to a grip icon. It is wrapped in the reorder start listener. Return SizedBox.shrink to hide the handle.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shrinkWrap → bool
final

Methods

build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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