MultiDayLayoutStrategy class abstract Layout

Assigns each event in the multi-day lane a row and a span of columns.

Columns are the visible dates and rows are the stacking order within the lane. Neither refers to a widget: both are concepts MultiDayLayout uses to position events.

Set it on the header or month body configuration:

MonthBodyConfiguration(
  multiDayLayoutStrategy: const MultiDayLayoutStrategy.byDuration(),
)

Write your own by extending this class. Call defaultMultiDayFrameGenerator from generateFrame to keep the built-in row assignment and change only the order events are placed in, or build the frame yourself.

This is a class rather than a function so that it has value equality. Header and month configurations are compared with == to decide whether the layout frame cache survives, and a function field written inline would clear that cache on every build.

Implementers

Constructors

MultiDayLayoutStrategy()
const
MultiDayLayoutStrategy.byDuration()
Places the longest events first, breaking ties by start time. The default.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

generateFrame({required FloatingDateTimeRange visibleRange, required List<KalenderEvent> events, required TextDirection textDirection, required Location? location, required MultiDayLayoutFrameCache? cache}) MultiDayLayoutFrame
The layout frame for events across visibleRange.
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