Skip to content

A Flutter PaginatedDataTable that can fetch Firestore documents from a Query object and filter them using a provided function.

License

Notifications You must be signed in to change notification settings

grlduarte/firestore_data_table_source

Repository files navigation

Firestore DataTableSource

This package provides a DataTableSource to be used with a PaginatedDataTable that can fetch Firestore elements using a Query object and filter them in dart.

If you're looking for a quick way to display your Firestore data in a paginated data table, check out Google's official Firebase UI for Firestore. On the other hand, if you need more flexibility and customization, this package might be what you need.

Usage

For a more complete example, check the example app.

final dataSource = FirestoreDataTableSource(
  query: FirebaseFirestore.instance.collection('my-collection'),
  getDataRow: (snapshot) => DataRow(
    cells: <DataCell>[DataCell(Text(snapshot.id))],
  ),
);

...

PaginatedDataTable(
  source: dataSource,
  columns: const <DataColumn>[
    DataColumn(label: Text("Id")),
  ],
);

Additional information

To file feature requests or bugs, visit the issues page.

About

A Flutter PaginatedDataTable that can fetch Firestore documents from a Query object and filter them using a provided function.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •