PlannerConfig<T> class

Constructors

PlannerConfig({required List<String> labels, int minHour = 0, int maxHour = 23, String hourLabelFormatter(int hour)?, int blockWidth = 200, int blockHeight = 40, int snapMinutes = 15, int snapMinutesForZoom(double zoom)?, double minZoom = 0.5, double maxZoom = 4.0, TextStyle hourLabelStyle = const TextStyle(color: Colors.black), TextStyle dateLabelStyle = const TextStyle(color: Colors.black), TextStyle contextMenuTextStyle = const TextStyle(color: Colors.blue), TextStyle contextMenuDeleteTextStyle = const TextStyle(color: Colors.red), String contextMenuCreateLabel = 'Create Event', String contextMenuEditLabel = 'Edit Event', String contextMenuDeleteLabel = 'Delete Event', SpanOverlap spanOverlap = SpanOverlap.fullWidth, int? highlightedColumn, Color highlightColumnColor = const Color.fromARGB(40, 255, 255, 255), Color hourBackground = Colors.white, Color dateBackground = Colors.white, Color contextMenuBackground = Colors.white, bool showZoomControls = true, Color? zoomButtonColor, Color zoomButtonIconColor = Colors.white, double scrollStep = 20, bool showAllDayBand = false, double allDayBandLaneHeight = 24, Color allDayBandBackground = const Color.fromARGB(255, 60, 60, 60), Color plannerBackground = const Color.fromARGB(255, 50, 50, 50), Color horizontalLineColor = const Color.fromARGB(255, 100, 100, 100), Color verticalLineColor = const Color.fromARGB(255, 150, 150, 150), dynamic onEntryCreate(PlannerTime time)?, void onEntryDelete(PlannerEntry<T> entry)?, void onEntryEdit(PlannerEntry<T> entry)?, void onEntryMove(PlannerEntry<T> entry)?, void onEntryLongPress(PlannerEntry<T> entry)?, double dateRowHeight = 50, double hourColumnWidth = 50})

Properties

allDayBandBackground Color
Background fill of the all-day band (#48). Defaults to a dark grey close to the plannerBackground so the band reads as the top of the column area; override it to match a light theme or to set it off from the grid. Ignored when showAllDayBand is false or there are no all-day events (the band isn't shown).
getter/setter pair
allDayBandLaneHeight double
Height, in logical pixels, of one stacked lane in the all-day band (#48). All-day events (PlannerTime.allDay) render as chips above the time grid; concurrent ones (sharing a column) stack into separate lanes, and the band auto-sizes to the number of lanes used. The band is omitted entirely (zero height) when showAllDayBand is false or there are no all-day events, so this has no effect then.
getter/setter pair
blockHeight int
getter/setter pair
blockWidth int
getter/setter pair
contextMenuBackground Color
getter/setter pair
contextMenuCreateLabel String
Label for the "create event" item shown when the context menu is opened on an empty grid cell. Override to translate or customize it; defaults to the English 'Create Event'.
getter/setter pair
contextMenuDeleteLabel String
Label for the "delete event" item shown when the context menu is opened on an existing event. Override to translate or customize it; defaults to the English 'Delete Event'.
getter/setter pair
contextMenuDeleteTextStyle TextStyle
getter/setter pair
contextMenuEditLabel String
Label for the "edit event" item shown when the context menu is opened on an existing event. Override to translate or customize it; defaults to the English 'Edit Event'.
getter/setter pair
contextMenuTextStyle TextStyle
getter/setter pair
dateBackground Color
getter/setter pair
dateLabelStyle TextStyle
getter/setter pair
dateRowHeight double
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
highlightColumnColor Color
Fill colour painted across the highlightedColumn, behind the grid lines and events. Defaults to a subtle translucent white wash so setting highlightedColumn alone is visible on the default dark plannerBackground; override it for a different emphasis (e.g. a brand "today" tint, or a darker wash on a light background). Ignored when highlightedColumn is null.
getter/setter pair
highlightedColumn int?
Index into labels of a column to emphasize — e.g. a "today" highlight — or null (the default) to highlight nothing. The widget stays date-agnostic: a consumer building a calendar maps DateTime.now() to a column index itself and passes it here (see ADR 0001 / #46), so no DateTime enters the public API. An out-of-range index highlights nothing.
getter/setter pair
horizontalLineColor Color
getter/setter pair
hourBackground Color
getter/setter pair
hourColumnWidth double
getter/setter pair
hourLabelFormatter String Function(int hour)?
Formats the integer hour shown in the left-hand hour column. Receives the hour-of-day (minHour..maxHour) and returns the label text. When null the hour is rendered as the bare integer (e.g. 9, 17).
getter/setter pair
hourLabelStyle TextStyle
getter/setter pair
labels List<String>
getter/setter pair
maxHour int
getter/setter pair
maxZoom double
getter/setter pair
minHour int
getter/setter pair
minZoom double
Lower/upper bounds applied to the pinch/zoom factor in Controller.updateZoom. Without these the zoom could shrink toward 0 (blocks collapse, hit-testing explodes) or grow without limit.
getter/setter pair
onEntryCreate ↔ dynamic Function(PlannerTime time)?
getter/setter pair
onEntryDelete ↔ void Function(PlannerEntry<T> entry)?
getter/setter pair
onEntryEdit ↔ void Function(PlannerEntry<T> entry)?
getter/setter pair
onEntryLongPress ↔ void Function(PlannerEntry<T> entry)?
Fired when the user long-presses an event, with the pressed PlannerEntry. This is the primary way to act on an event by touch: touch has no right-click, and a one-finger drag now pans, so long-press is the freed-up gesture (#66). It also fires on a desktop long-press.
getter/setter pair
onEntryMove ↔ void Function(PlannerEntry<T> entry)?
getter/setter pair
plannerBackground Color
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollStep double
Base distance, in logical pixels, that one mouse-wheel notch scrolls the time axis at zoom 1. The effective step is scaled by the current zoom (Controller.verticalScroll) so a single notch always moves the same amount of time regardless of zoom (the old code used a fixed 20px step that moved less time the further you zoomed in). Defaults to 20.
getter/setter pair
showAllDayBand bool
Whether the all-day band (#48) is shown at all. Opt-in: defaults to false, so by default no band is rendered and PlannerTime.allDay entries don't appear anywhere (they have no hour position, so they're simply not drawn). Set it to true to enable the band — it then appears above the time grid whenever there is at least one all-day event, and the chips become interactive and accessible (#72). With the band disabled, allDayBandLaneHeight / allDayBandBackground have no effect.
getter/setter pair
showZoomControls bool
Whether the on-canvas zoom +/- buttons are shown. Hosts that drive zoom by pinch (or their own chrome) can hide the built-in buttons by setting this to false. Defaults to true.
getter/setter pair
snapMinutes int
Granularity, in minutes, that event times snap to — for both creating an event by tapping an empty cell and dragging/resizing an existing one, so the two behave identically (the old code used different ad-hoc, zoom-dependent thresholds for each).
getter/setter pair
snapMinutesForZoom int Function(double zoom)?
Optional zoom-aware override of snapMinutes. When non-null it is called with the current zoom factor and its result is used as the snap interval for that frame, letting events snap more finely as the user zooms in, e.g. snapMinutesForZoom: (z) => z >= 3 ? 5 : z >= 2 ? 15 : 30. When null (the default) the flat snapMinutes applies at every zoom level.
getter/setter pair
spanOverlap SpanOverlap
How column-spanning events (those whose PlannerTime.endDay covers several columns, #47) coexist with the per-column overlap split (#20). Defaults to SpanOverlap.fullWidth — the span draws as one continuous box across its columns; switch to SpanOverlap.split to fold it into each column's sub-column layout instead. Has no effect on single-column events.
getter/setter pair
verticalLineColor Color
getter/setter pair
zoomButtonColor Color?
Fill colour of the zoom +/- buttons. When null (the default) the buttons fall back to the ambient Theme.of(context).colorScheme.secondary, the previous hardcoded behaviour; set a colour to override it.
getter/setter pair
zoomButtonIconColor Color
Colour of the +/- icons inside the zoom buttons. Defaults to white.
getter/setter pair

Methods

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