grid_sheet 2.2.0
grid_sheet: ^2.2.0 copied to clipboard
A powerful Flutter DataGrid/DataTable for large datasets, offering Excel-like features and fully customizable cells — ready with minimal setup. See README for full features
Changelog #
2.2.0 #
Breaking Changes #
- Added
isSelectedtoGridSheetRowWrappercallbacks, to expose row-level selection state based onGridSheetManager.selectedRowKeysrather than individual cell selection. - Deprecated
GridSheetConfiguration.serialNumberColumnandserialNumberColumnWidth; useGridSheet.indexColumninstead. - Deprecated
GridSheetDynamicTableGeneration.typeandwidth; usecolumnBuilderandrowBuilderto customize generated columns and rows.
Bug Fixes #
- Fixed built-in and custom select-all header checkboxes not updating when row selection changes through individual row taps.
- Fixed
GridSheetManager.filtersexposing the mutable internal filter map by returning an unmodifiable view instead. - Fixed
getSelectedRows()andgetSelectedColumns()rebuilding full lookup maps on every call by reusing the existing row and column indexes. - Fixed column reordering leaving stale context menus and filtered-row caches by resetting both after
reorderColumnsByPositions(),setColumnOrderByNames(), andresetColumnOrder(). - Fixed
fillCells()triggering redundant formula recalculations against partially filled data by batching formula-dependent recalculations. - Fixed
createSnapshot()sharingdropdownOptionslists with live columns by copying the lists when creating snapshots. - Added
CellAuditTrailto the package's public exports alongside the existingCellChangeRecordexport.
New Features #
- Added full RTL support through
GridSheetDirection, including mirrored column layout, alignment, borders, scrolling, virtualization, resizing, drag operations, pagination controls, expansion indicators, sorting icons, and reading-start/reading-end pinning. - Added configurable
GridSheet.indexColumn, replacing the deprecatedserialNumberColumnandserialNumberColumnWidthproperties with a singleGridSheetColumn?supporting title, width, pinning, alignment, and visibility configuration. - Added
GridSheetColumn.showOverflowTooltipfor opt-in per-column overflow hover tooltips, reducing unnecessary text-overflow measurement costs. - Added dynamic table customization through
GridSheetDynamicTableGeneration.columnBuilderandrowBuilder, allowing generated columns and rows to override their properties while retaining generator-managed keys and indexes. - Added undo-delete support for row and column deletions through
GridSheetConfiguration.enableUndoDelete, built-in and custom undo prompts, andGridSheetUndoDeleteEventcallbacks. - Extended
GridSheetCellContext.onToggleRowExpansionandisRowExpandedto all row cells when row expansion is enabled, allowing custom cells to provide their own expansion controls. - Added configurable pinned-column dividers through
GridSheetStyleConfiguration.pinnedLeftDividerColor,pinnedRightDividerColor, andpinnedColumnsDividerWidth, rendered between panes without overlaying active cell content.
2.1.0 #
Breaking Changes #
- Changed
GridSheetRow.datato an unmodifiable view to prevent mutations that bypass change tracking and formula dependency updates; useGridSheetManager.setCellAtorupdateRowByKeyinstead. - Changed
GridSheetRow.heightto a read-only getter to prevent direct mutations from desynchronizing visual row heights from the virtualized layout; use the provided row-height manager APIs instead. - Added the
isPinnedRightparameter toGridSheetHeaderWrapper,GridSheetFilterWrapper, andGridSheetRowWrappercallbacks, requiring existing callbacks to accept the new parameter. - Changed
enableCellNavigationLeft/Right arrow keys to clamp at the first/last column instead of wrapping between rows, while Tab/Shift+Tab retain row wrapping and Left/Right during text editing control the cursor instead of cell navigation.
Bug Fixes #
- Fixed
updateRowHeights()andupdateRowHeightsByKeys()updating model heights without visually resizing the corresponding rows. - Fixed
autofillVerticalCells()andautofillHorizontalCells()ignoring suppliedsourceValuesby seeding source cells with the provided values before extrapolation. - Fixed stale column widths returned by
findColumnByKey(),findColumnByName(), andgetColumnWidths()after auto-fit or drag-resizing by rebuilding the cached column index after width changes. - Fixed virtualized arrow-key and Enter navigation failing for cells outside the current build window by scrolling targets into the built range before requesting focus.
- Fixed keyboard navigation selecting the destination cell when
enableCellSelectionis enabled; navigation now moves focus without changing selection. - Fixed the pinned-right boundary border rendering above selected or hovered row highlights by moving it into the pane's first-column cells to share the pinned-left overlay stack.
- Fixed
clearPinColumns()and similar column moves causingsetState()/markNeedsBuild()errors by deferring column-virtualization range recalculation until the next frame. - Fixed the pinned-right boundary border disappearing when horizontal overflow is absent by suppressing the trailing scrollable-column border only when overflow actually exists.
New Features #
- Added
GridSheet.onError,GridSheetErrorEvent, andGridSheetErrorSourcefor routing internally handled failures to custom error-reporting systems instead ofdebugPrint. - Added Sliver-backed row virtualization to build only rows within or near the viewport, enabling smooth scrolling with 100K+ rows while keeping widget counts bounded.
- Added column virtualization for scrollable non-pinned columns, significantly improving performance for wide schemas with hundreds of columns.
- Added full row-expansion support for virtualized rows, including virtualized expand/collapse animations.
- Updated editable cells to support multiline text when row heights increase through resizing or auto-fit APIs while preserving Enter-to-next-row navigation.
- Added right-pinned columns via
GridSheetColumn.pinnedRight, including manager APIs, pinned-right selection/conditional-format support, and a dedicated non-virtualized pane before the scrollbar. - Rebuilt
enableCellNavigationwith dedicatedShortcuts/Actionsbindings so Tab/Shift+Tab follow logical order across pinned/hidden columns, Shift+Enter moves upward, and read-only cells remain keyboard-selectable. - Added
GridSheet.noColumnsWidgetto display a configurable empty state when all real columns are hidden, excluding the synthetic serial-number column from the visibility check.
2.0.4 #
Bug Fixes #
- Fixed the cell editor border using row border styling instead of its own configuration.
- Fixed header and cell overflow tooltips not attaching correctly in some cases.
- Updated
hoverColorOnRowto matchselectionColorbehavior whenshowBorderOnSelectionis enabled. - Fixed the row expansion panel width to match the grid's rendered width instead of the window width, preventing overflow and right-edge gaps.
- Fixed the row expansion panel scrollbar overlapping the last column by reserving scrollbar space.
New Features #
- Added context menu appearance configuration (elevation, radius, background, and backdrop dimming).
- Added custom builders for reveal animations and cell flash effects.
- Added customizable auto-fill handle shape and border radius.
- Added a custom scrollbar builder and independent horizontal/vertical scrollbar visibility.
- Added vertical scrollbar placement options (
afterLastColumnoroverlay). - Added configurable resize handle color and thickness.
- Added configurable drag feedback elevation and opacity.
- Added independent cell editor border color and width.
- Added
stretchColumnsToFillWidthto expand columns and fill available width. - Added
maxStretchWidthto limit how much individual columns can stretch. - Redesigned and improved the row expansion panel layout with responsive field wrapping that adapts continuously to the available width.
2.0.3 #
Bug Fixes #
- Fixed serial numbers resetting on each server-side pagination page instead of continuing across pages.
- Fixed numeric input formatters clearing cells when entering decimals or negative values.
- Fixed
createSnapshot()/restoreSnapshot()losing filtered rows, undo baselines, and formula state. - Fixed
insertRows(),deleteRowsAt(), andupdateRowHeights()using incorrect row positions with client-side pagination. - Fixed
betweenandnotBetweenfilters failing with negative values. - Fixed corrupted pagination state causing duplicate rows after a failed
infiniteScrollreload. - Fixed incorrect serialization of conditional-format
fontWeightvalues ingetConditionalFormattingStyles(). - Fixed
animationConfiguration,conditionalFormatRules, andevaluatornot updating afterGridSheetrebuilds. - Fixed the context menu remaining open after row/column changes, sorting, filtering, or reloads.
- Fixed
GridSheetRow.copyWith()losing the original row height, breakingresetHeight(). - Fixed
findAndReplacecounting matches in read-only and non-editable cells. - Fixed
parseHexColorincorrectly parsing 3-digit shorthand hex colors. - Corrected
GridSheetRowdocumentation to prevent corrupting the undo baseline.
2.0.2 #
- Added a live demo page to showcase GridSheet features and capabilities.
- Added
GridSheetConditionalFormatRule.stopIfTrueto support Excel-style "Stop If True" behavior. When enabled on a matching rule, lower-priority conditional formatting rules are ignored for that cell. - Added
GridSheetManager.reorderConditionalFormatRulesByPositionsto allow changing conditional formatting rule priority after rules have been added. - Added the
atIndexparameter toaddConditionalFormatRuleto insert a new conditional formatting rule at a specific priority position instead of adding it at the end. - Renamed the
GridSheetCellValueChangedEvent.columnNameproperty tonamefor improved clarity and consistency. - Added the
titleproperty toGridSheetCellValueChangedEventto provide additional cell context. - Added support for preserving conditional formatting styles when generating exports
GridSheetManager.getConditionalFormattingStyles. - Fixed duplicate column border rendering in tables when
showColumnBordersis enabled with frozen and active columns.
2.0.1 #
Bug Fixes #
- Fixed formula dependency synchronization after structural changes.
- Fixed formula undo history after row and column operations.
- Fixed autofill corruption after sorting and structural modifications.
- Fixed incorrect numeric autofill pattern detection.
- Fixed selection rendering with pinned-left and serial-number columns.
- Fixed hover synchronization across pinned and scrollable sections.
- Fixed hidden columns retaining stale selection state.
- Fixed stale selection and expanded-row state after reloads.
- Fixed duplicated rows sharing mutable data.
- Fixed stale cell listeners after column insertions and deletions.
- Fixed row disposal idempotency.
- Fixed context menu visibility logic.
- Fixed runtime type errors when assigning
nullto mixed-type data. - Fixed
LEFT,RIGHT, andMIDthrowingRangeError. - Improved JSON import validation with descriptive errors.
- Fixed multiple rendering, pagination, caching, rebuild, documentation, and compatibility issues.
- Fixed formula-column insertion without matching
defaultValues. - Secured CSV exports against formula/DDE injection.
- Fixed stale infinite-scroll responses merging after reloads.
- Fixed
exportToCSVWithFormulas(includeFormulas: true)exporting evaluated values instead of formulas. - Fixed initial auto-fetch when using
infiniteScrollwithoutserverSidePagination.
2.0.0 #
Breaking Changes #
deleteRowsAt/deleteRowsByKeysnow returnFuture<List<ValueKey<String>>>instead ofFuture<int>.- Renamed
GridSheetLayoutConfigurationtoGridSheetConfiguration(deprecated alias provided). - Renamed
GridSheetgridManagerHelperstoGridSheetManagerHelpers. - Deprecated
GridSheetConfiguration.rowHeight; useGridSheetRow.heightfor per-row heights.
New Features #
- Added configurable staggered slide-in animation via
GridSheetAnimationConfiguration(GridSheet.animationConfiguration). - Slide-in animation now automatically replays after pagination changes.
- Added
animateRowsOnSortOrFilterto animate row slide-in after sorting and filtering. - Row slide-in animation now supports server-side pagination and infinite scroll when enabled.
- Added configurable
cellChangeFlashEnabledanimation for edited or recalculated cells. - Added
columnVisibilityFadeEnabledfor smooth column show/hide width and opacity transitions. - Added
insertRowsandinsertColumnsAPIs with configurable insertion positions. - Added
defaultValuessupport forinsertRowsandinsertRowsAt. - Added
refreshAllFormulas; CSV exports now refresh formulas automatically before exporting. - Added
selectionIncludesPinnedLeftCellsandconditionalFormatIncludesPinnedLeftCells. - Added
showOnlyEditableColumnsto row expansion configuration. - Added
pinColumnsToLeft,clearPinColumns,pinnedLeftColumns, andactiveColumns. rowStateColorBuilder,rowStateIconBuilder, andsortIconBuildercan now returnnull.- Added
GridSheetRow.resetHeightto restore a row's original height. - Added
GridSheetManager.getCellFormulato retrieve a cell's raw formula. - Added
onlyCurrentPageRowstoexportToCSV.
Performance Improvements #
- Optimized formula recalculation to update only dependent formulas.
- Improved formula initialization by avoiding unnecessary dependency graph copies.
- Replaced recursive circular-reference detection with an iterative implementation.
- Optimized bulk row deletion with a single-pass algorithm.
- Eliminated unnecessary full-grid rebuilds during column resizing.
- Reduced selection border rendering overhead.
- Optimized overflow tooltip detection using cached text measurements.
Improvements #
- Formula dependency graphs now stay synchronized after structural changes.
GridSheetConfigurationnow updates automatically on parent rebuilds.- Improved server-side pagination by ignoring stale overlapping requests.
- Added graceful handling for failed server-side page requests.
- Improved built-in row expansion and row selection interaction.
selectColumnAcrossAllPagesnow correctly affects selected-column APIs.resetAllRowHeightsnow restores each row's original height.
API Changes #
- Added APIs for programmatic pinned-column management.
- Renamed
freezeColumnsUptoIndextopinColumnsLeftUptoIndex(deprecated alias retained). - Deprecated
freezeColumnsUptoKeyin favor ofpinColumnsLeftUptoIndex. - Renamed
GridSheetColumn.pinnedLefttopinnedLeft(deprecated alias retained). - Renamed
GridSheetColumnContextInfo.isFrozentoisPinnedLeft(deprecated alias retained). - Renamed
GridSheet.onCellValueChangetoonCellValueChanged(deprecated alias retained). - Fixed
exportToCSV.onlyCurrentpageRowstypo (onlyCurrentPageRowsis now canonical). - Deprecated
GridSheetConfiguration.rowHeightin favor ofGridSheetRow.height. - Renamed
GridSheetgridManagerHelperstoGridSheetManagerHelpers. - Renamed
Token/TokenTypetoGridSheetFormulaToken/GridSheetFormulaTokenType(deprecated aliases retained). - Restored deprecated compatibility shims for
enableReorderandreorderColumnsByOrder.
Default Changes #
- Changed default
rowsPerPagefrom 50 to 30. - Changed default grid border radius from 4px rounded to square.
1.3.1 #
- Added
row expansionfeature support — to expand an inline sub-panel (a child table, a form, extra fields). - Added new property
descriptioninGridSheetColumn— useful for abbreviated column names descriptions. - Added manual and scheduled auto-reload with reload callbacks and runtime controls.
- Added
rowsLoaderfor refreshing client-side data without rebuilding. - Added
updateConfigurationfor updating non-structural layout settings at runtime. - Added cell tooltip on overflow — when cell text is truncated, show a tooltip on hover with the full value.
- Fixed reload lifecycle, auto-reload scheduling, and error handling.
- Fixed rows-per-page sync and infinite-scroll reload rollback.
- Fixed missing fields in
GridSheetLayoutConfiguration(copyWith, equality,hashCode, andtoString). - Fixed
evaluateFormulareturn type. - Fixed
fillCells(increment: true)correctly incrementing numeric values.
1.3.0 #
- Added
server-side (lazy pagination),infinity-scrollpaginations feature support - Added row-reordering feature support
- Added cell type
GridSheetColumnType.dropdown— built-in dropdown/select cells feature support - Renamed
enableReorderproperty toenableColumnReorder - Renamed
reorderColumnsByOrdermethod toreorderColumnsByPositions - Fixed performance issue when switching theme.
- Fixed cell level conditional format issue when reordering columns
1.2.9 #
- Optimized internal code for better overall performance and stability
- Fixed minor bugs
1.2.8 #
- Optimized internal code for better overall performance and stability
- Added row resize functionality
- Added
Unique Countaggregation - Added support of
showColumnHeaderRowoption inlayoutConfiguration - Added support of
ascSortIconColor,descSortIconColoroptions instyleConfiguration
1.2.7 #
- Enhanced Pagination
- Optimized code and improved performance
1.2.6 #
- Added support of column level aggregations
- Fixed some issues
1.2.5 #
- Performance Optimization
- Added support of new option filterPosition in GridSheetConfiguration
- Fixed some issues
1.2.4 #
- Refactor: replace expression style fields with static-based text style
BREAKING CHANGE: removed
textStyleExpression— usetextStyleinstead
1.2.3 #
- Refactor: replace static color/style fields with expression-based conditional formatting API
BREAKING CHANGE: removed
expression,backgroundColor,fontStyle— usebackgroundColorExpressionandtextStyleExpressioninstead
1.2.2 #
- Added dynamic table generation: tables can now be generated at runtime based on
columnsCountandrowsCount. - Added
renameColumnsmethod: allows renaming of column names and optional titles.
1.2.1 #
- Refactored internal auto-fill logic to reduce code duplication and improve maintainability.
- Added
loadingOverlayColoroption in styleConfiguration
1.2.0 #
- Provided support of autofill(cell drag-to-copy) feature.
1.1.9 #
- Fixed Undo Feature issue with formula type columns
1.1.8 #
- Fixed issues related to formula type
- Added ISBLANK, ISNUMBER, ISTEXT formula functions
1.1.7 #
- Updated example to demonstrate light and dark theme support
- Provided support of formula type cell feature.
1.1.6 #
- Added default norowswidget
1.1.5 #
- Added issue_tracker link in pubspec file
1.1.4 #
- Updated package description within pub.dev limits
1.1.3 #
- Updated example with latest code
1.1.2 #
- Fixed select all issue
1.1.1 #
- updated license
1.1.0 #
- Added row on hover feature.
- Added headerWrapper feature.
- Added filterWrapper feature.
- Added rowWrapper feature.
1.0.5 #
- Added sample example.
1.0.4 #
- Removed prints.
1.0.3 #
- Removed theming classes.
1.0.2 #
- Removed unrequired classes.
1.0.1 #
- Removed unrequired passages.
1.0.0 #
- Initial release of GridSheet.
- Added row and column operations.
- Added sorting, filtering, pagination, and selection support.