I managed to populate a SfDatagrid table with data from firestore, this is the link to the code:
This code is running perfectly and I have the desired result.
But the problem is that on a table selection I want the app to navigate on a detail page and show more info from the firebase source on the selected row.
But I don't know how I can pass the document snapshot or document index to the detail page when row is selected.
Notice that I am not a pro yet, I'm just getting started.
I tried this:
onCellTap: (DataGridCellTapDetails details) {
final DataGridRow row = employeeDataGridSource
.effectiveRows[details.rowColumnIndex.rowIndex - 1];
Navigator.of(context).push(MaterialPageRoute(
builder: (context) => DataGridRowInfoPage(row: row)));
},
But it only shows the info on the table, but on the firestore document I have a lots of field and I can't show them all on a table, I wish to show them only on detail page.