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
| File | Covers |
|---|---|
| Install & first grid | first grid, columns, rows, editing, read-only, the state manager |
| Theming | follow the host app's ThemeData; per-column / per-cell colors |
| Events | onChanged/onSelected/onSorted callbacks and the event-bus stream |
| Guides · Reference | formulas, sort/filter/paginate, import/export, workbook, chart, pivot, and the rest |
Public widgets
| Widget | What |
|---|---|
BCellGrid | the grid |
BCellPagination | pager plugin (drop under the grid) |
BCellWorkbookView + BCellSheetTabBar | multi-sheet workbook |
BCellChart | line / bar / pie over the grid's data |
BCellFontScope | broadcast 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.