user24036645
user24036645

Reputation: 1

How can I change page programmaticly in PaginatedDataTable?

There are several Paginate DataTable widgets on my page. I want that when the button is clicked, a new item is added to the end of the list and the page switches to the last one. How can I programmatically change the page number in one of the tables? In this case, you cannot use GlobalKey to get PagibateDataTableState, because it will not be unique.

Now I managed to get PaginateDataTableState via findAncestorStateOfType from the context of the child widget, but it looks bad

Upvotes: 0

Views: 86

Answers (0)

Related Questions