The following illustration most probably will be able to tell my question in an easier way.

as seen in the image, when the user drags the text "CLASS 5" horizontally to the left, text will go to "CLASS 6" and if right, the text will be "CLASS 4".
Or if the user taps (or presses) the right and the left buttons, it will change the similarly.
When the text changed, the value of the text will be changed and the content in the page will be updated.
This feature is mostly used in calendar components. But since it's a bit complicated, I wished to know if I can make this simply.
Thank you for all support.
You can use GestureDetector, IconButton, and Text widgets to achieve the above functionality.
Basically, you have to maintain the currently active page/title state.
Here is a sample page bar for you.
Usage:
Result: