lazy_data_table 0.1.2 copy "lazy_data_table: ^0.1.2" to clipboard
lazy_data_table: ^0.1.2 copied to clipboard

outdated

A Flutter data table with (optional) sticky row and/or column headers that loads the contents lazily.

lazy_data_table #

A Flutter widget data table that can be loaded lazily. The table also has a column header row and a row header column that will stay in view. (This widget is still in development, and may not work 100%)

This widget is based on the sticky-headers-table made by Alex Babich, so credits to him.

Features #

  • Scrollable when items overflow
  • Column header row stays in view
  • Row header column stays in view
  • Items are loaded lazily

Usage #

To use this widget, add lazy_data_table: ^0.1.2 to your dependencies in pubspec.yaml

dependencies:
  lazy_data_table: ^0.1.2

Then the package can be included in a file with:

import 'package:lazy_data_table/lazy_data_table.dart';

And then the LazyDataTable can be used as following:

LazyDataTable(
  rows: 20,
  columns: 20,
  cellHeight: 50,
  cellWidth: 50,
  columnHeaderHeight: 75,
  rowHeaderWidth: 75,
  columnHeaderBuilder: (i) => Text("Col:${i+1}"),
  rowHeaderBuilder: (i) => Text("Row:${i+1}"),
  dataCellBuilder: (i, j) => Text("Cell:$i,$j"),
  cornerWidget: Text("Corner"),
),

Known issues #

Currently, whenever you scroll vertically, every row that is currently loaded has their offset corrected to make sure every line is at the same position. This isn't ideal as it causes a lot of unnecessary updates. Ideally you'd only want the row to be updated once when it's loaded, but I can't seem to figure that out :/

66
likes
0
pub points
85%
popularity

Publisher

unverified uploader

A Flutter data table with (optional) sticky row and/or column headers that loads the contents lazily.

Repository (GitLab)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on lazy_data_table