This is one of the requirements we faced for PowerApps solution. Where we will get the number of items required and from which item Id.
First step
We used a connector which collects data from PowerApps about page size means how many items it needs to retrieve, and what is the starting item id.
Second Step
We will add a compose action which takes page input size
Again we used Compose action to store Starting item Id
Then we used a Dataverse connector which will retrieve data from Dataverse, We need to provide Table Name, columns internal names in select column section, Filter query i.e we needs to check if provided page size is greater then serial ID then it will return rows. Again we can set Row count means how many rows we want to retrieve from Dataverse at once.
In the next step we will use Select Action
Select action allows you to transform the shape of objects in an array.
We will Map those values from Dataverse with Key Value Pair.
We again send the response to Power Apps, Power Apps will again request data for Next Page if next button is clicked.
This flow will run for every click on next and previous button on Power Apps Gallery.