changePage method
- int page
Updates the selected page to the provided index.
This method updates the selectedPage
to the given page
index,
which determines the current page being displayed.
Parameters:
page
: The index of the page to select.
Implementation
void changePage(int page) {
selectedPage.value = page;
}