SSpreadsheet class

A reusable, spreadsheet-like 2D table composed of:

  • a fixed top header row
  • an optional fixed left row-header column
  • vertically virtualized body rows (ListView.builder)
  • synchronized horizontal scrolling for all rows and headers

This first engine intentionally mirrors the proven sync-scroll architecture used in heavy custom schedulers, while exposing reusable builders.

Inheritance
Available extensions

Constructors

SSpreadsheet({Key? key, required int rowCount, required int columnCount, required SSpreadsheetCellBuilder cellBuilder, SSpreadsheetRowHeaderBuilder? rowHeaderBuilder, SSpreadsheetColumnHeaderBuilder? columnHeaderBuilder, WidgetBuilder? cornerBuilder, double rowHeaderWidth = 100, double headerHeight = 48, SSpreadsheetRowHeightBuilder? rowHeightBuilder, SSpreadsheetColumnWidthBuilder? columnWidthBuilder, EdgeInsetsGeometry padding = EdgeInsets.zero, EdgeInsetsGeometry rowPadding = EdgeInsets.zero, IndexedScrollController? verticalIndexedController, ScrollPhysics? verticalPhysics, ScrollPhysics? horizontalPhysics, Color? backgroundColor, bool showColumnHeader = true, SSpreadsheetHorizontalMetricsChanged? onHorizontalMetricsChanged, SSpreadsheetHorizontalSyncController? horizontalSyncController, bool repaintBoundaryPerRow = false, Duration rowExtentAnimationDuration = Duration.zero, bool addAutomaticKeepAlives = false, bool enableRowAnimations = true, Key rowKeyBuilder(int rowIndex)?, Duration rowAnimationDuration = const Duration(milliseconds: 400)})
const

Properties

addAutomaticKeepAlives bool
Whether to keep body rows alive.
final
backgroundColor Color?
Optional background color behind the sheet.
final
cellBuilder SSpreadsheetCellBuilder
Builds each body cell.
final
columnCount int
Number of body columns (horizontally scrollable columns).
final
columnHeaderBuilder SSpreadsheetColumnHeaderBuilder?
Optional builder for the top fixed column-header cells.
final
columnWidthBuilder SSpreadsheetColumnWidthBuilder?
Width resolver for each body column.
final
cornerBuilder WidgetBuilder?
Optional builder for the top-left corner (intersection of row/column headers).
final
enableRowAnimations bool
Whether to animate rows when they are inserted or removed.
final
hashCode int
The hash code for this object.
no setterinherited
headerHeight double
Height of the top header row.
final
horizontalPhysics ScrollPhysics?
Horizontal row/header physics.
final
horizontalSyncController SSpreadsheetHorizontalSyncController?
Optional external horizontal sync controller that tracks shared horizontal metrics and allows external scroll controls.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onHorizontalMetricsChanged SSpreadsheetHorizontalMetricsChanged?
Optional callback exposing synchronized horizontal scroll metrics.
final
padding EdgeInsetsGeometry
Padding applied around the whole spreadsheet.
final
repaintBoundaryPerRow bool
Whether to wrap each built body row in a RepaintBoundary.
final
rowAnimationDuration Duration
Duration of the insert/remove row animation. Defaults to 400ms.
final
rowCount int
Number of body rows.
final
rowExtentAnimationDuration Duration
Optional animation duration for row height changes.
final
rowHeaderBuilder SSpreadsheetRowHeaderBuilder?
Optional builder for the left fixed row-header cells.
final
rowHeaderWidth double
Width of the fixed left row-header column.
final
rowHeightBuilder SSpreadsheetRowHeightBuilder?
Height resolver for each body row.
final
rowKeyBuilder Key Function(int rowIndex)?
Optional key builder that gives each row a stable identity across rebuilds.
final
rowPadding EdgeInsetsGeometry
Padding applied inside each body row container.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showColumnHeader bool
Whether to draw the top header row.
final
verticalIndexedController IndexedScrollController?
Optional IndexedScrollController for vertical (row) index-based scrolling.
final
verticalPhysics ScrollPhysics?
Vertical list physics.
final

Methods

addMaterialWidget() Material

Available on Widget, provided by the GenericExtensions extension

addTooltipWidget(String toolTip) Tooltip

Available on Widget, provided by the GenericExtensions extension

borderRadius([BorderRadiusGeometry? borderRadius]) Widget

Available on Widget, provided by the GenericExtensions extension

boxDecoration([BoxDecoration? boxDecoration]) Widget

Available on Widget, provided by the GenericExtensions extension

colorFilter([ColorFilter? colorFilter]) Widget

Available on Widget, provided by the GenericExtensions extension

set parent widget in center
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SSpreadsheet>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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