grid_sheet 2.0.0 copy "grid_sheet: ^2.0.0" to clipboard
grid_sheet: ^2.0.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.0.0 #

Breaking Changes #

  • GridSheetConfiguration.rowHeight has been deprecated in favor of GridSheetRow.height, allowing row height to be configured on a per-row basis.
  • deleteRowsAt and deleteRowsByKeys now return Future<List<ValueKey<String>>> instead of Future<int>.
  • GridSheetLayoutConfiguration has been renamed to GridSheetConfiguration. A deprecated type alias is provided for backward compatibility.
  • GridSheetgridManagerHelpers has been renamed to GridSheetManagerHelpers.

New Features #

  • Added an opt-in column reveal animation through GridSheetAnimationConfiguration (configured via GridSheet.animationConfiguration). When enabled is true, columns are revealed with a staggered slide-and-fade animation on the initial grid build—pinned-left columns animate first, followed by scrollable columns. The animation is customizable using animationDuration, curve, and slideDistance, and is disabled by default.
  • The column reveal animation plays once when the grid is first mounted and automatically replays after pagination changes (goToPage, nextPage, previousPage, and changeRowsPerPage).
  • Added animateRowsOnSortOrFilter, which replays the same staggered slide-and-fade animation for rows (top to bottom) whenever the current page is re-sorted or re-filtered. This animation reuses animationDuration, curve, and slideDistance, and intentionally performs a fresh reveal rather than animating rows from their previous positions to their new positions.
  • When animateRowsOnSortOrFilter and replayOnPageChange are both enabled, the row reveal now also replays for serverSidePagination page changes (the same full-page cascade used for sort/filter), and for infiniteScroll batch loads — where only the newly-appended rows animate, leaving already-visible rows untouched. Client-side pagination continues to never trigger a row reveal.
  • Added cellChangeFlashEnabled, which briefly flashes a cell's background whenever its value changes due to a direct edit or a dependent formula recalculation. The flash behavior is customizable via cellChangeFlashColor and cellChangeFlashDuration. Bulk or initial formula evaluation (initial mount, pagination, sorting, filtering, and refreshAllFormulas) does not trigger the animation. Autofill, paste, and CSV import are not yet supported.
  • Added columnVisibilityFadeEnabled, which animates both a column's width and opacity over animationDuration when columns are shown (showColumns) or hidden (hideColumns). During the transition, columns to the right slide smoothly into or away from the expanding/shrinking space in sync with the fade, creating a seamless layout transition without leaving a temporary gap or causing columns to jump after the animation completes.
  • Added insertRows and insertColumns to GridSheetManager for inserting rows or columns relative to the current selection. Insertion behavior is configurable through GridSheetRowInsertPosition, GridSheetColumnInsertPosition, and the new rowInsertPosition / columnInsertPosition configuration options.
  • Added defaultValues to insertRows and insertRowsAt to populate newly inserted rows with either a single value, per-column values, or null (default).
  • Added refreshAllFormulas to recompute formulas across the entire dataset. CSV exports now automatically refresh all formulas before exporting, ensuring exported values are always up to date.
  • Added selectionIncludesPinnedLeftCells and conditionalFormatIncludesPinnedLeftCells to optionally extend selection highlighting and conditional formatting into pinned-left columns.
  • Added showOnlyEditableColumns to GridSheetRowExpansionConfiguration. The built-in row expansion form now displays only editable columns by default.
  • Added pinColumnsToLeft, clearPinColumns, pinnedLeftColumns, and activeColumns to simplify programmatic column pinning and management.
  • rowStateColorBuilder, rowStateIconBuilder, and sortIconBuilder now support returning null, allowing the grid to gracefully fall back to default behavior.
  • Added GridSheetRow.resetHeight to restore a single row's height back to the value it was constructed with.
  • Added GridSheetManager.getCellFormula to read back a formula cell's raw formula text (e.g. =A1+B1) through the public interface, returning null for a non-formula cell or an unknown row/column key.
  • exportToCSV now supports an onlyCurrentPageRows parameter to restrict export to the current page's rows, matching the option already available on exportToCSVWithFormulas.

Performance Improvements #

  • Optimized formula recalculation so only dependent formulas are recomputed after cell edits.
  • Improved formula initialization performance by eliminating unnecessary dependency graph copying.
  • Replaced recursive circular-reference detection with an iterative implementation to prevent stack overflows on large dependency chains.
  • Optimized bulk row deletion using a single-pass algorithm.
  • Eliminated unnecessary full-grid rebuilds during column resizing.
  • Reduced selection border rendering overhead by avoiding repeated page-row allocations.
  • Optimized overflow tooltip detection by reusing cached text measurements.

Improvements #

  • Formula dependency graphs are now correctly remapped after row or column insertion, deletion, sorting, reordering, and reset operations.
  • GridSheetConfiguration now automatically synchronizes when updated by parent widget rebuilds.
  • Improved server-side pagination by discarding stale responses from overlapping page requests.
  • Added graceful error handling for failed server-side page requests, preventing unhandled async exceptions.
  • Improved built-in row expansion interaction so row selection and expansion no longer conflict.
  • selectColumnAcrossAllPages now correctly controls the default behavior of selected-column retrieval APIs.
  • resetAllRowHeights now restores each row to the height it was individually constructed with, instead of collapsing every row to a single shared default height.

Bug Fixes #

This release includes numerous stability and correctness improvements across the grid, including fixes for:

  • Formula dependency synchronization after structural changes.
  • Formula undo history being lost after row or column operations.
  • Autofill corruption after sorting or structural modifications.
  • Incorrect autofill pattern detection for inconsistent numeric sequences.
  • Selection rendering issues involving pinned-left and serial-number columns.
  • Hover synchronization between pinned-left and scrollable row sections.
  • Hidden columns retaining stale selection state.
  • Reload operations leaving stale row selection or expanded-row state.
  • Row duplication sharing mutable data with the original row.
  • Stale cell listeners after column insertions or deletions.
  • Row disposal not being idempotent.
  • Context menu visibility incorrectly depending on row context menu configuration.
  • Runtime type errors when assigning null to mixed-type row data.
  • LEFT, RIGHT, and MID throwing RangeError instead of returning formula errors.
  • Improved JSON import validation with descriptive FormatExceptions.
  • Multiple rendering, pagination, caching, rebuild, documentation, and API compatibility issues.
  • insertColumnsAt/insertColumns throwing an uncaught TypeError when inserting a formula-type column without matching defaultValues — the default null cell value is no longer routed into formula evaluation unless it's actually a formula string.
  • exportToCSV/exportToCSVWithFormulas no longer write a cell value that starts with =, +, -, or @ unescaped — such values are now prefixed to prevent formula/DDE injection when the exported file is opened in a spreadsheet application, while an intentionally-exported formula (via exportToCSVWithFormulas's includeFormulas) still keeps its leading =.
  • Infinite-scroll fetches now share _goToPage's request-staleness guard, so a sort/filter/reload that fires while a scroll-triggered fetch is still in flight no longer lets the stale response merge rows from the old sort/filter state into the freshly-reloaded rows.
  • exportToCSVWithFormulas's includeFormulas: true now actually exports formula cells' live formula text instead of always exporting the evaluated value — the internal check used to look up a cell's formula never matched through any public entry point, so this option was silently a no-op.
  • A GridSheet configured with only infiniteScroll: true (without also setting serverSidePagination: true) now correctly auto-fetches page 1 on mount, matching infiniteScroll's documented behavior of implying server-side pagination on its own.

API Changes #

  • Added pinColumnsToLeft, clearPinColumns, pinnedLeftColumns, and activeColumns for programmatic pinned-column management.
  • Renamed freezeColumnsUptoIndex to pinColumnsLeftUptoIndex. The previous API remains available as a deprecated alias.
  • Deprecated freezeColumnsUptoKey in favor of pinColumnsLeftUptoIndex.
  • Renamed GridSheetColumn.pinnedLeft to pinnedLeft, for consistency with pinColumnsLeftUptoIndex/pinColumnsToLeft. The previous field remains available as a deprecated alias.
  • Renamed GridSheetColumnContextInfo.isFrozen to isPinnedLeft. The previous getter remains available as a deprecated alias.
  • Renamed GridSheet.onCellValueChange to onCellValueChanged, matching the past-tense naming of onColumnsSelected/onRowsSelected/onCellsSelected. The previous callback remains available as a deprecated alias.
  • Fixed a typo in exportToCSV's onlyCurrentpageRows parameter — the correctly-spelled onlyCurrentPageRows is now the canonical name; the misspelled parameter remains available as a deprecated alias.
  • Deprecated GridSheetConfiguration.rowHeight, in favour of GridSheetRow.height.
  • Renamed GridSheetgridManagerHelpers to GridSheetManagerHelpers.
  • Renamed Token and TokenType to GridSheetFormulaToken and GridSheetFormulaTokenType. Deprecated aliases remain available for backward compatibility.
  • Restored deprecated compatibility shims for enableReorder and reorderColumnsByOrder.

Default Changes #

  • Default GridSheetConfiguration.rowsPerPage changed from 50 to 30.
  • Default GridSheetStyleConfiguration.gridBorderRadius changed from 4px rounded corners to square corners.

1.3.1 #

  • Added row expansion feature support — to expand an inline sub-panel (a child table, a form, extra fields).
  • Added new property description in GridSheetColumn — useful for abbreviated column names descriptions.
  • Added manual and scheduled auto-reload with reload callbacks and runtime controls.
  • Added rowsLoader for refreshing client-side data without rebuilding.
  • Added updateConfiguration for 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, and toString).
  • Fixed evaluateFormula return type.
  • Fixed fillCells(increment: true) correctly incrementing numeric values.

1.3.0 #

  • Added server-side (lazy pagination), infinity-scroll paginations feature support
  • Added row-reordering feature support
  • Added cell type GridSheetColumnType.dropdown — built-in dropdown/select cells feature support
  • Renamed enableReorder property to enableColumnReorder
  • Renamed reorderColumnsByOrder method to reorderColumnsByPositions
  • 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 Count aggregation
  • Added support of showColumnHeaderRow option in layoutConfiguration
  • Added support of ascSortIconColor, descSortIconColor options in styleConfiguration

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 — use textStyle instead

1.2.3 #

  • Refactor: replace static color/style fields with expression-based conditional formatting API BREAKING CHANGE: removed expression, backgroundColor, fontStyle — use backgroundColorExpression and textStyleExpression instead

1.2.2 #

  • Added dynamic table generation: tables can now be generated at runtime based on columnsCount and rowsCount.
  • Added renameColumns method: allows renaming of column names and optional titles.

1.2.1 #

  • Refactored internal auto-fill logic to reduce code duplication and improve maintainability.
  • Added loadingOverlayColor option 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.
3
likes
0
points
762
downloads

Publisher

unverified uploader

Weekly Downloads

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

Homepage
View/report issues

Topics

#data-table #data-grid #table #excel #spreadsheet

License

unknown (license)

Dependencies

expressions, flutter

More

Packages that depend on grid_sheet