Marker class

A class that represents a marker item in a timeline.

Each marker consists of a main content child, an optional icon, and configuration for its positioning and interaction.

Constructors

Marker.new({required Widget child, Widget? icon, VoidCallback? onTap, MarkerIconAlignment? iconAlignment, MarkerPosition position = MarkerPosition.left, double maxWidth = double.infinity})
Creates a new Marker instance, previosly known as TimelineItem.

Properties

child Widget
The main content widget of the marker.
final
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
An optional icon widget displayed alongside the marker. If not provided, a default circular dot will be used.
final
iconAlignment MarkerIconAlignment?
Defines how the icon should be aligned relative to the marker content. This affects the vertical alignment of the icon.
final
maxWidth double
The maximum width constraint for the marker content. Defaults to double.infinity.
final
onTap VoidCallback?
Callback function triggered when the marker is tapped.
final
position MarkerPosition
The position of the marker relative to the timeline. Defaults to MarkerPosition.left.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({Widget? child, Widget? icon, MarkerPosition? position, VoidCallback? onTap, MarkerIconAlignment? iconAlignment, double? maxWidth}) Marker
Creates a copy of this Marker with the given fields replaced with new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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