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

outdated

A Flutter data table that can be loaded 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.0.1 to your dependencies in pubspec.yaml

dependencies:
  lazy_data_table: ^0.0.1

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 :/

65
likes
0
pub points
84%
popularity

Publisher

unverified uploader

A Flutter data table that can be loaded lazily

Repository (GitLab)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on lazy_data_table