swayze 1.0.2 swayze: ^1.0.2 copied to clipboard
A set of widgets and controllers to display very large tables on flutter apps.
The spreadsheet with superpowers ✨!
Swayze 🕺 #
A set of widgets and controllers to display very large tables on flutter apps.
It exports a sliver that renders a table with scroll virtualization in two axis. This means that only visible widgets are built, only the visible render objects go trough layout and painting.
Swayze is the spreadsheet rendering engine for tables in the Rows app.
Installation #
flutter pub add swayze
Usage #
Everything on Swayze starts via a widget. SliverSwayzeTable
represents a single table.
Since it is a sliver, it should be wrapped in a scroll view.
CustomScrollView(
slivers: [
SliverSwayzeTable(
tableData: widget.table,
eventInterceptor: eventInterceptor,
controller: controller,
style: myStyle,
// ...
),
],
);
Style #
The field style
is optional and defaults to a default style instance defaultSwayzeStyle
.
It is possible to extends a style just with the fields to be customized.
final myStyle = SwayzeStyle.defaultSwayzeStyle.copyWith(
selectionStyle: SelectionStyle(color: Colors.pink),
);