Hello, How to PlutoGrid rows data update(refresh) with Loader on click button.
I want the rows data to be refreshed with loader when the refresh icon is clicked. Even if we remain on any pagination number, when the tab is refreshed, it shows us the data of pagination 1.
On refresh fetchData should call currentPage 1await fetchData(currentPage, false, list);
Here the image refresh icon with data
Here the fetch function code
` Future fetch(
PlutoLazyPaginationRequest request,
) async {
currentPage = request.page;
await fetchData(currentPage, false, list);
Hello, How to PlutoGrid rows data update(refresh) with Loader on click button.
I want the rows data to be refreshed with loader when the refresh icon is clicked. Even if we remain on any pagination number, when the tab is refreshed, it shows us the data of pagination 1.
On refresh fetchData should call currentPage 1
await fetchData(currentPage, false, list);
Here the image refresh icon with data
Here the fetch function code ` Future fetch(
PlutoLazyPaginationRequest request,
) async {
currentPage = request.page;
await fetchData(currentPage, false, list);
}`
Here the getRowsFromDbData code
List<PlutoRow> getRowsFromDbData() { return databaseData.map((row) { return PlutoRow( cells: { 'id': PlutoCell(value: row['id'].toString()), 'visitor_name': PlutoCell(value: row['visitor_name']), 'nvr_name': PlutoCell(value: row['nvr_name']), }, ); }).toList(); }
Plutogrid code
`PlutoGrid( key: _plutoGridKey, columns: columns, rows: databaseData.isNotEmpty ? getRowsFromDbData() : [], // columnGroups: columnGroups,