I've created PaginatedDataTable in flutter as below
Everything works fine but I want to show this in Television and need to change Page by automatic, is there any way to do this?
I've created PaginatedDataTable in flutter as below
Everything works fine but I want to show this in Television and need to change Page by automatic, is there any way to do this?
I found the solution by using PaginatorController as below
void startTimer(PaginatorController paginatorController, int duration) {
Timer.periodic(Duration(seconds: duration), (Timer t) {
if (paginatorController.isAttached) {
// Check if still less than row count
if (paginatorController.currentRowIndex +
paginatorController.rowsPerPage <
paginatorController.rowCount) {
paginatorController.goToNextPage();
} else {
// If last page go back to first page
paginatorController.goToFirstPage();
}
}
});
}