Skip to main content

bcell — usage guide

A Flutter data grid with a pluto_grid-shaped API, growing toward an Excel-like spreadsheet feature set. Everything below is copy-paste ready.

Install

# pubspec.yaml
dependencies:
bcell:
path: ../bcell # or a pub / git ref
import 'package:bcell/bcell.dart'; // one barrel, everything public

Hello world

BCellGrid(
columns: [
BCellColumn(title: 'Id', field: 'id', type: BCellColumnType.number(), width: 80),
BCellColumn(title: 'Name', field: 'name', type: BCellColumnType.text()),
],
rows: [
BCellRow(cells: {
'id': BCellValue(value: 1),
'name': BCellValue(value: 'Ada Lovelace'),
}),
],
onLoaded: (e) => _stateManager = e.stateManager, // drives everything after mount
)

BCellGrid owns columns/rows after mount. The stateManager from onLoaded is how you sort, filter, page, export, edit, etc. — keep it.

Guides

FileCovers
Install & first gridfirst grid, columns, rows, editing, read-only, the state manager
Themingfollow the host app's ThemeData; per-column / per-cell colors
EventsonChanged/onSelected/onSorted callbacks and the event-bus stream
Guides · Referenceformulas, sort/filter/paginate, import/export, workbook, chart, pivot, and the rest

Public widgets

WidgetWhat
BCellGridthe grid
BCellPaginationpager plugin (drop under the grid)
BCellWorkbookView + BCellSheetTabBarmulti-sheet workbook
BCellChartline / bar / pie over the grid's data
BCellFontScopebroadcast one font to every BCell widget below it

For a live playground of every feature with its calling code, run the Widgetbook: cd widgetbook && flutter run -d chrome.