easy_table 0.8.0 copy "easy_table: ^0.8.0" to clipboard
easy_table: ^0.8.0 copied to clipboard

discontinuedreplaced by: davi
outdated

A full customized table that builds the cells on demand. Focused on Web/Desktop Applications. Bidirectional scroll bars.

Easy Table #

  • Ready for a large number of data. Building cells on demand.
  • Focused on Web/Desktop Applications.
  • Bidirectional scroll bars (always visible).
  • Sortable.
  • Resizable.
  • Highly customized.

Usage #

Get started #

EasyTableModel<Person>? _model;

@override
void initState() {
  super.initState();

  _model = EasyTableModel<Person>(rows: [
    Person('Landon', 19),
    Person('Sari', 22),
    Person('Julian', 37),
    Person('Carey', 39),
    Person('Cadu', 43),
    Person('Delmar', 72)
  ], columns: [
    EasyTableColumn(name: 'Name', stringValue: (row) => row.name),
    EasyTableColumn(name: 'Age', intValue: (row) => row.age)
  ]);
}

@override
Widget build(BuildContext context) {
  return EasyTable<Person>(_model);
}

Columns fit #

  _model = EasyTableModel<Person>(rows: [
    Person('Landon', 19),
    Person('Sari', 22),
    Person('Julian', 37),
    Person('Carey', 39),
    Person('Cadu', 43),
    Person('Delmar', 72)
  ], columns: [
    EasyTableColumn(name: 'Name', weight: 5, stringValue: (row) => row.name),
    EasyTableColumn(name: 'Age', weight: 1, intValue: (row) => row.age)
  ]);
  EasyTable<Person>(_model, columnsFit: true);

Custom cell #

_model = EasyTableModel<Person>(rows: rows, columns: [
  EasyTableColumn(name: 'Name', stringValue: (row) => row.name),
  EasyTableColumn(
      name: 'Rate',
      width: 150,
      cellBuilder: (context, row) => StarsWidget(stars: row.stars))
]);

Row callbacks #

@override
Widget build(BuildContext context) {
  return EasyTable<Person>(_model,
      onRowTap: (person) => _onRowTap(context, person),
      onRowDoubleTap: (person) => _onRowDoubleTap(context, person));
}

void _onRowTap(BuildContext context, Person person) {
  ...
}

void _onRowDoubleTap(BuildContext context, Person person) {
  ...
}

Null values #

Cell color #

  _model = EasyTableModel<Person>(rows: [
    Person('Landon', '+321 321-432-543'),
    Person('Sari', '+123 456-789-012'),
    Person('Julian', null),
    Person('Carey', '+111 222-333-444'),
    Person('Cadu', null),
    Person('Delmar', '+22 222-222-222')
  ], columns: [
    EasyTableColumn(name: 'Name', width: 120, stringValue: (row) => row.name),
    EasyTableColumn(
        name: 'Mobile', width: 150, stringValue: (row) => row.mobile)
  ]);
  EasyTableTheme(
      child: EasyTable<Person>(_model),
      data: EasyTableThemeData(
          cell:
              CellThemeData(nullValueColor: ((rowIndex) => Colors.grey[300]))));

TODO #

  • Collapsed rows
  • Header grouping
  • Row selection
  • Custom headers
  • Cell edition
  • Column reorder
  • Pinned column
  • Filter
  • More theming options
  • And everything else, the sky is the limit
52
likes
0
points
98
downloads

Publisher

verified publishercaduandrade.net

Weekly Downloads

A full customized table that builds the cells on demand. Focused on Web/Desktop Applications. Bidirectional scroll bars.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, meta

More

Packages that depend on easy_table