EventLayoutDelegate class abstract

The base MultiChildLayoutDelegate class for laying out CalendarEvents.

EventLayoutDelegates are used to layout CalendarEvents in a CustomMultiChildLayout.

The EventLayoutDelegate has some helper methods:

Inheritance
Implementers

Constructors

EventLayoutDelegate({required Iterable<CalendarEvent> events, required double heightPerMinute, required InternalDateTime date, required Location? location, required TimeOfDayRange timeOfDayRange, required double? minimumTileHeight, required EventLayoutDelegateCache layoutCache})

Properties

date InternalDateTime
The date for which the events are laid out.
final
events Iterable<CalendarEvent>
The list of events that will be laid out. (The order of these events are the same as the widget's)
final
hashCode int
The hash code for this object.
no setterinherited
heightPerMinute double
The height per minute of the current view.
final
layoutCache EventLayoutDelegateCache
The cache for the EventLayoutDelegate.
final
location Location?
The location for which the events are laid out.
final
minimumTileHeight double?
The minimum height of a tile.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeOfDayRange TimeOfDayRange
The time of day range for which the events are laid out.
final

Methods

calculateDistanceFromStart(CalendarEvent event) double
Calculates the distance from the start of the day to the start of the event.
calculateHeight(CalendarEvent event) double
Calculates the height of an item based on the CalendarEvent.duration and heightPerMinute of the event.
calculateVerticalLayoutData(Size size) List<VerticalLayoutData>
Vertical layout of the events.
findLongestChain(Iterable<VerticalLayoutData> verticalLayoutData) int
Finds the longest chain of overlapping events using depth-first search.
getSize(BoxConstraints constraints) Size
Override this method to return the size of this object given the incoming constraints.
inherited
groupVerticalLayoutData(List<VerticalLayoutData> verticalLayoutData) List<HorizontalGroupData>
Groups the VerticalLayoutData into horizontal groups.
hasChild(Object childId) bool
True if a non-null LayoutChild was provided for the specified id.
inherited
layoutChild(Object childId, BoxConstraints constraints) Size
Ask the child to update its layout within the limits specified by the constraints parameter. The child's size is returned.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performLayout(Size size) → void
Override this method to lay out and position all children given this widget's size.
inherited
positionChild(Object childId, Offset offset) → void
Specify the child's origin relative to this origin.
inherited
shouldRelayout(covariant EventLayoutDelegate oldDelegate) bool
Override this method to return true when the children need to be laid out.
override
sortEvents(Iterable<CalendarEvent> events) List<CalendarEvent>
Sorts the CalendarEvents.
sortVerticalLayoutData(List<VerticalLayoutData> layoutData) List<VerticalLayoutData>
This is used to sort the vertical layout data after calculation.
toString() String
Override this method to include additional information in the debugging data printed by debugDumpRenderTree and friends.
inherited

Operators

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