VolvoxGridController class
Controller for a single VolvoxGrid instance.
Usage:
final controller = VolvoxGridController();
await controller.create(rows: 101, cols: 6);
await controller.setCellText(0, 0, 'Header');
- Inheritance
-
- Object
- ChangeNotifier
- VolvoxGridController
Constructors
Properties
- gpuBackend → String?
-
The backend string used for the active GPU texture ('gles' or 'vulkan').
no setter
- gpuSurfaceHandle → int?
-
Active GPU native surface handle (if created via createGpuTexture).
no setter
- gpuTextureId → int?
-
Active GPU texture ID (if created via createGpuTexture).
no setter
- gridId → Int64
-
The native grid id. Zero until create completes.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isCreated → bool
-
Whether the grid has been created successfully.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- themePreset → ThemePreset
-
Last theme preset requested through this controller.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addSubtotals(
Iterable< int> amountCols, Iterable<VolvoxGridSubtotalLevel> levels, {AggregateType aggregate = AggregateType.AGG_SUM, bool clearExisting = true, int mergeColFrom = _subtotalNoMergeColumn, int mergeColTo = _subtotalNoMergeColumn}) → Future<void> - Add subtotals for multiple aggregate columns and grouping levels.
-
aggregate(
AggregateType type, int row1, int col1, int row2, int col2) → Future< double> - Aggregate a rectangular range and return the numeric result.
-
animationEnabled(
) → Future< bool> - Get whether layout animation is enabled.
-
appendData(
List< int> data, {LoadDataOptions? options}) → Future<LoadDataResult> - Parse CSV or JSON bytes and append them after the current grid rows.
-
archive(
{required ArchiveRequest_Action action, String name = '', List< int> data = const []}) → Future<ArchiveResponse> - Store/load/list/delete named archive snapshots.
-
autoSize(
{int colFrom = 0, int colTo = -1, bool equal = false, int maxWidth = 0}) → Future< void> - Auto-size a range of columns.
-
beginEdit(
int row, int col, {EditStartReason reason = EditStartReason.EDIT_START_PROGRAMMATIC, String? seedText, int? caretPosition, bool? formulaMode}) → Future< void> - Begin editing the given cell.
-
beginEditState(
int row, int col, {EditStartReason reason = EditStartReason.EDIT_START_PROGRAMMATIC, String? seedText, int? caretPosition, bool? formulaMode}) → Future< EditState> - Begin editing the given cell and return the resulting edit state.
-
cancelEdit(
{Int64? sessionId, Int64? stateVersion}) → Future< void> - Cancel the current cell edit.
-
clear(
{ClearScope scope = ClearScope.CLEAR_EVERYTHING, ClearRegion region = ClearRegion.CLEAR_SCROLLABLE}) → Future< void> -
Clear content/formatting based on
scopeandregion. -
clearSelection(
) → Future< void> - Clear the current selection.
-
colCount(
) → Future< int> - Get the total number of columns.
-
commitEdit(
String text, {bool cancel = false, Int64? sessionId, Int64? stateVersion}) → Future< void> - Commit or cancel the current cell edit.
-
commitEditState(
String text, {bool cancel = false, Int64? sessionId, Int64? stateVersion}) → Future< EditState> - Commit or cancel the current cell edit and return the resulting state.
-
configure(
GridConfig config) → Future< void> -
copy(
) → Future< ClipboardResponse> - Copy current selection to clipboard payload.
-
create(
{int rows = 50, int cols = 10, int viewportWidth = 800, int viewportHeight = 600, double scale = 1.0}) → Future< void> - Create a new native grid instance.
-
createGpuTexture(
{String backend = 'gles', int width = 1, int height = 1}) → Future< int?> - (Android only) Create a native GPU texture for zero-copy rendering.
-
cursorCol(
) → Future< int> - Get the current cursor column.
-
cursorRow(
) → Future< int> - Get the current cursor row.
-
customRenderMode(
) → Future< CustomRenderMode> - Get the active custom render mode.
-
cut(
) → Future< ClipboardResponse> - Cut current selection to clipboard payload.
-
defineColumns(
DefineColumnsRequest request) → Future< void> -
defineRows(
DefineRowsRequest request) → Future< void> -
deleteSelection(
) → Future< void> - Delete current selection contents.
-
destroyGrid(
) → Future< void> - Destroy the native grid and release resources.
-
dispose(
) → void -
Discards any resources used by the object.
override
-
editable(
) → Future< bool> - Get whether editing is enabled.
-
editTrigger(
) → Future< EditTrigger> - Get the edit trigger mode for the grid.
-
eventStream(
) → Stream< GridEvent> - Subscribe to native grid events (selection changes, edits, etc.).
-
findRowByRegex(
String pattern, {required int col, int startRow = 0}) → Future< int> -
Find a row using regex query. Returns
-1when not found. -
findRowByText(
String text, {required int col, int startRow = 0, bool caseSensitive = false, bool fullMatch = false}) → Future< int> -
Find a row using plain text query. Returns
-1when not found. -
fontFallbackEnabled(
) → Future< bool> - Get whether font fallback is enabled.
-
frozenColCount(
) → Future< int> - Get the number of frozen (non-scrollable data) columns.
-
frozenRowCount(
) → Future< int> - Get the number of frozen (non-scrollable data) rows below the header band.
-
getCellsRange(
int row1, int col1, int row2, int col2, {bool includeStyle = false, bool includeChecked = false, bool includeTyped = false, bool includeRichText = false}) → Future< CellsResponse> - Get a rectangular range of cells in a single native round-trip.
-
getCellText(
int row, int col) → Future< String> -
Get the text of a cell at the given
rowandcol. -
getColumnIndicatorTopConfig(
) → Future< ColIndicatorConfig> - Get the top column-indicator band configuration.
-
getColWidth(
int col) → Future< int> - Get the width of a specific column.
-
getConfig(
) → Future< GridConfig> -
getDemoData(
String demo) → Future< Uint8List> -
getEditCellStyle(
int row, int col) → Future< EditCellStyle?> - Get the effective edit style for a cell (font, padding).
-
getEditState(
) → Future< EditState> - Query the current edit session state without changing it.
-
getGridStyle(
) → Future< StyleConfig> - Get the current effective grid-level style.
-
getInteractionConfig(
) → Future< InteractionConfig> - Get the current interaction/UX configuration.
-
getMergedRange(
int row, int col) → Future< CellRange> -
Return the merged range containing (
row,col). -
getMergedRegions(
) → Future< MergedRegionsResponse> - Return all explicit merge regions.
-
getNode(
int row, {NodeRelation? relation}) → Future< NodeInfo> -
Query outline node information for
row. -
getRowHeight(
int row) → Future< int> - Get the height of a specific row.
-
getRowIndicatorStartConfig(
) → Future< RowIndicatorConfig> - Get the start-side row-indicator band configuration.
-
getSchema(
) → Future< SchemaResponse> -
getSelection(
) → Future< SelectionState> - Get the current selection state, including all returned ranges.
-
insertRows(
int index, {int count = 1, List< String> text = const []}) → Future<void> -
Insert
countrows beforeindex(-1appends at end). -
isRenderLayerEnabled(
RenderLayerBit layer) → Future< bool> - Check whether a render layer is enabled in the current mask.
-
leftCol(
) → Future< int> - Get the leftmost visible scrollable column.
-
loadData(
List< int> data, {LoadDataOptions? options}) → Future<LoadDataResult> - Parse CSV or JSON bytes and load them into the grid.
-
loadDemo(
String demo) → Future< void> - Load a built-in engine demo ("sales", "hierarchy", or "stress").
-
loadTable(
int rows, int cols, List< CellValue> values, {bool atomic = false}) → Future<void> - Load a row-major typed matrix in one RPC.
-
mergeCells(
int row1, int col1, int row2, int col2) → Future< void> - Merge cells in the given range.
-
moveColumn(
int col, int position) → Future< void> -
Move a column to a new
position. -
moveRow(
int row, int position) → Future< void> -
Move a row to a new
position. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
outline(
int level) → Future< void> -
Expand/collapse rows to the requested
level. -
paste(
String text) → Future< void> - Paste provided clipboard text into current selection.
-
pinRow(
int row, PinPosition pin) → Future< void> - Pin a row to top or bottom, or unpin it.
-
presentMode(
) → Future< int> - Get the current presentation mode (0=Auto, 1=Fifo, 2=Mailbox, 3=Immediate).
-
printGrid(
{PrintOrientation orientation = PrintOrientation.PRINT_PORTRAIT, int marginLeft = 0, int marginTop = 0, int marginRight = 0, int marginBottom = 0, String header = '', bool showPageNumbers = true}) → Future< PrintResponse> - Render printable pages.
-
refresh(
) → Future< void> - Force a full repaint.
-
releaseGpuTexture(
{bool graceful = false}) → Future< void> - (Android only) Release the native GPU texture.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removeRows(
int index, {int count = 1}) → Future< void> -
Remove
countrows starting atindex. -
rendererBackend(
) → Future< RendererBackend> - Get the current renderer backend.
-
rendererMode(
) → Future< int> - Get the current renderer mode (0=AUTO, 1=CPU, 2=GPU).
-
renderLayerMask(
) → Future< Int64> - Get the current render layer visibility bitmask.
-
renderSession(
Stream< RenderInput> inputs) → Stream<RenderOutput> - Open a bidirectional render session.
-
resizeViewport(
int width, int height) → Future< void> - Notify the native grid that the viewport size changed.
-
rowCount(
) → Future< int> - Get the total number of rows.
-
saveGrid(
{ExportFormat format = ExportFormat.EXPORT_BINARY, ExportScope scope = ExportScope.EXPORT_ALL}) → Future< ExportResponse> - Save the grid to an in-memory payload.
-
scrollBlitEnabled(
) → Future< bool> - Get whether scroll blitting is enabled.
-
selectRange(
int rowStart, int colStart, int rowEnd, int colEnd) → Future< void> - Select a rectangular range of cells.
-
selectRanges(
Iterable< CellRange> ranges, {int? activeRow, int? activeCol, bool show = false}) → Future<void> - Select multiple rectangular ranges.
-
setActiveCellStyle(
HighlightStyle style) → Future< void> - Set the active/current cell highlight style.
-
setAnimationEnabled(
bool enabled, {int durationMs = 0}) → Future< void> - Enable or disable layout animation.
-
setCellDropdown(
int row, int col, ListEditorParams dropdown) → Future< void> - Set the typed dropdown for an individual cell.
-
setCells(
List< CellTextEntry> cells) → Future<void> - Batch set many cell values in a single RPC.
-
setCellSpanMode(
CellSpanMode mode) → Future< void> - Set the cell span mode.
-
setCellStyleRange(
int row1, int col1, int row2, int col2, CellStyle style) → Future< void> - Apply cell style to an explicit range.
-
setCellText(
int row, int col, String text) → Future< void> -
Set the text of a cell at the given
rowandcol. -
setColAlignment(
int col, Align alignment) → Future< void> - Set the text alignment for a column.
-
setColCount(
int n) → Future< void> - Set the total number of columns.
-
setColDataType(
int col, ColumnDataType dataType) → Future< void> - Set the data type for a column (string, number, date, etc.).
-
setColDropdown(
int col, ListEditorParams dropdown) → Future< void> - Set the typed dropdown for a column.
-
setColFormat(
int col, String format) → Future< void> - Set the format string for a column (e.g. '#,##0.00' for currency).
-
setColSticky(
int col, StickyEdge edge) → Future< void> - Set sticky edge for a column.
-
setColumnCaption(
int col, String caption) → Future< void> - Set the caption shown in the top column-indicator band for a column.
-
setColumnIndicatorTopConfig(
ColIndicatorConfig config) → Future< void> - Set the top column-indicator band configuration.
-
setColumnIndicatorTopRowCount(
int rows) → Future< void> - Set the number of rows in the top column-indicator band.
-
setColWidth(
int col, int width) → Future< void> - Set the width of a specific column in pixels.
-
setCursorCol(
int col) → Future< void> - Move the active cursor to the given column.
-
setCursorRow(
int row) → Future< void> - Move the active cursor to the given row.
-
setCustomRenderMode(
CustomRenderMode mode) → Future< void> - Enable native custom-render mode.
-
setDebugOverlay(
bool enabled) → Future< void> - Enable or disable the debug overlay.
-
setEditable(
bool enabled) → Future< void> - Enable or disable editing.
-
setEditPreedit(
String text, {int cursor = 0, bool commit = false, Int64? sessionId, Int64? stateVersion}) → Future< EditState> - Update IME preedit/composition state for the active edit session.
-
setEditText(
String text, {Int64? sessionId, Int64? stateVersion}) → Future< EditState> - Replace the active edit session text.
-
setEditTrigger(
EditTrigger mode) → Future< void> - Set the edit trigger mode for the grid.
-
setFastScrollEnabled(
bool enabled) → Future< void> - Enable/disable engine-side fast scroll thumb.
-
setFlingEnabled(
bool enabled) → Future< void> - Enable/disable engine-side inertial fling.
-
setFlingFriction(
double friction) → Future< void> - Set engine inertial friction (higher values stop sooner).
-
setFlingImpulseGain(
double gain) → Future< void> - Set engine inertial impulse gain (higher values fling farther/faster).
-
setFontFallbackEnabled(
bool enabled) → Future< void> - Enable or disable font fallback for missing glyphs.
-
setFrozenColCount(
int n) → Future< void> - Set frozen (non-scrollable data) columns.
-
setFrozenRowCount(
int n) → Future< void> - Set frozen (non-scrollable data) rows below the header band.
-
setGpuTextureSize(
int width, int height) → Future< void> - (Android only) Update the GPU texture size.
-
setGridStyle(
StyleConfig style) → Future< void> - Apply grid-level style defaults (font, colors, lines, etc.).
-
setHeaderFeatures(
HeaderFeatures features) → Future< void> - Configure header features (sort/reorder/chooser behavior).
-
setHoverConfig(
HoverConfig config) → Future< void> - Set hover enablement and highlight styles.
-
setInteractionConfig(
InteractionConfig config) → Future< void> - Set common interaction/UX behavior in one call.
-
setIsSubtotal(
int row, bool isSubtotal) → Future< void> - Mark a row as a subtotal node (shows +/- expand/collapse button).
-
setLeftCol(
int col) → Future< void> - Set the leftmost visible scrollable column.
-
setPresentMode(
int mode) → Future< void> - Set the presentation mode: 0=Auto, 1=Fifo (vsync), 2=Mailbox, 3=Immediate.
-
setRedraw(
bool enabled) → Future< void> - Suspend or resume native redraw.
-
setRendererBackend(
RendererBackend backend) → Future< void> - Set the preferred renderer backend.
-
setRendererMode(
int mode) → Future< void> - Set renderer mode: 0=AUTO, 1=CPU, 2=GPU, 3=Vulkan, 4=GLES.
-
setRenderLayerEnabled(
RenderLayerBit layer, bool enabled) → Future< void> - Enable or disable a single render layer.
-
setRenderLayerMask(
Int64 mask) → Future< void> - Set the render layer visibility bitmask.
-
setResizePolicy(
ResizePolicy policy) → Future< void> - Configure row/column resizing behavior.
-
setRowCount(
int n) → Future< void> - Set the total number of rows.
-
setRowHeight(
int row, int height) → Future< void> - Set the height of a specific row in pixels.
-
setRowIndicatorStartConfig(
RowIndicatorConfig config) → Future< void> - Set the start-side row-indicator band configuration.
-
setRowIndicatorStartWidth(
int width) → Future< void> - Set the start-side row-indicator width.
-
setRowOutlineLevel(
int row, int level) → Future< void> - Set the outline level for a specific row.
-
setRowSticky(
int row, StickyEdge edge) → Future< void> - Set sticky edge for a row.
-
setScrollBars(
ScrollBarsMode mode) → Future< void> - Set scrollbar visibility mode.
-
setScrollBlit(
bool enabled) → Future< void> - Enable or disable scroll blitting during panning/scrolling.
-
setSelectionMode(
SelectionMode mode) → Future< void> - Set the selection mode (free, by-row, by-column, listbox).
-
setSelectionStyle(
HighlightStyle style) → Future< void> - Set the selection highlight style.
-
setSelectionVisibility(
SelectionVisibility style) → Future< void> - Set the selection visibility style.
-
setShowColumnHeaders(
bool visible) → Future< void> - Show or hide the top column-indicator band used for headers.
-
setShowRowIndicator(
bool visible) → Future< void> - Show or hide the start-side row-indicator band.
-
setSpanCol(
int col, bool span) → Future< void> - Enable or disable spanning for a specific column.
-
setSpanRow(
int row, bool span) → Future< void> - Enable or disable spanning for a specific row.
-
setTextLayoutCacheCap(
int cap) → Future< void> - Set the text layout cache capacity (0 = disabled).
-
setThemePreset(
ThemePreset preset) → Future< void> - Apply a built-in visual theme preset.
-
setTopRow(
int row) → Future< void> - Set the topmost visible scrollable row.
-
setTreeIndicator(
TreeIndicatorStyle style) → Future< void> - Set the tree indicator display mode.
-
showCell(
int row, int col) → Future< void> - Scroll the grid so that the specified cell is visible.
-
sort(
SortOrder order, {int col = -1, SortType? type}) → Future< void> - Sort the grid by one or more columns.
-
sortMulti(
List< (int, SortOrder)> columns, {Map<int, SortType> ? types}) → Future<void> - Sort the grid by multiple columns.
-
subtotal(
AggregateType aggregate, {required int groupOnCol, required int aggregateCol, String caption = '', int backColor = 0xFFE0E0E0, int foreColor = 0xFF000000, bool addOutline = true, Font? font}) → Future< SubtotalResult> -
Insert subtotal rows grouping on
groupOnColand aggregatingaggregateColwith the specifiedaggregatefunction. -
textLayoutCacheCap(
) → Future< int> - Get text layout cache capacity.
-
topRow(
) → Future< int> - Get the topmost visible scrollable row.
-
toString(
) → String -
A string representation of this object.
inherited
-
unmergeCells(
int row1, int col1, int row2, int col2) → Future< void> - Unmerge cells in the given range.
-
updateCells(
UpdateCellsRequest request) → Future< WriteResult> -
withRedrawSuspended<
T> (Future< T> action(), {bool refreshAfter = true}) → Future<T> -
Run
actionwhile redraw is disabled, then restore and refresh.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited