'"Minimizing" the current screen in Flutter
I'm building an app where I ping some data in my screen with the StreamBuilder (time, location, etc.), now I want to make an option for the user to leave the current screen without breaking the state or context of the screen, sort of like minimizing the screen. How can I achieve this in Flutter? Example: I have my Screen One where I ping the data:
Now I want to make an option to the user to check some other data in the back while the Screen One is still running in the background so it doesn't break the ping of data from the StreamBuilder:
If I use the Navigator.of(context).pop()
that will naturally pop the current screen and return to the previous one, so what I'm looking for is a solution not to break the state or context and still be able to return to the screen, like I said, sort of minimizing the screen.
Any idea of solution is quite helpful, thanks in advance!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|