SSpreadsheetHorizontalSyncController class

Shared horizontal synchronization state for SSpreadsheet.

Pass one instance to SSpreadsheet.horizontalSyncController and to SSpreadsheetHorizontalScrollButtons to control scrolling externally.

Every horizontal strip inside a spreadsheet — the column header and each mounted (virtualised) body row — owns its own ScrollController handed out by the shared sync group, and every one of them reports here. Reports are therefore funnelled through a single elected owner, so a body row that scrolls out of view cannot leave a disposed controller behind in value. The column header is preferred because it is never virtualised; a spreadsheet built with showColumnHeader: false falls back to the first live body strip.

value is only replaced when the published tuple actually changes (controller identity included), so a settled layout does not emit an endless notification loop.

Inheritance

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value ↔ SSpreadsheetHorizontalMetrics
The current value stored in this notifier.
getter/setter pairinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
animateToEnd({Duration duration = const Duration(milliseconds: 800), Curve curve = Curves.easeOutCubic}) → Future<void>
animateToStart({Duration duration = const Duration(milliseconds: 800), Curve curve = Curves.easeOutCubic}) → Future<void>
dispose() → void
Discards any resources used by the object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
refresh() → void
Re-reads the owning strip and republishes.
registerStrip(ScrollController controller, {required bool isPrimary}) → void
Called by SSpreadsheet when a strip mounts. isPrimary marks the column-header strip, which outlives every body row.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toString() → String
A string representation of this object.
inherited
unregisterStrip(ScrollController controller) → void
Called by SSpreadsheet when a strip is about to dispose its controller, so ownership moves on while the remaining strips are still usable.
update(double offset, double maxScrollExtent, ScrollController controller) → void
Reports a strip's live metrics.

Operators

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