Switch between screens with esp32 buttons

Hi, I have been trying for a while to switch from screen1 to screen2 by pressing a button located in one of the GPIO pins of the esp32. I want to do this by connecting the esp32 to my WiFi at home. I don't know how to write the code and what components and blocks to use. Is there anyone who can help me with that?

Switching Screens breaks Bluetooth connections.

Use stacked Arrangements, only one visible at a time, and stay in one Screen.

Simpler explanation You cant because it will break the Bluetooth connection instead you can hide the layouts like how I did it in my (in-progress) chat app
Screenshot 2024-04-28 7.28.03 PM

Maybe you can use my app base which simulates android's screens.

How to use tutorial coming soon.