'Flutter: GetX place multiple pages on the stack
I use Getx for route management in my Flutter application.
When a certain notification arrives and the app starts from terminated state I want:
- launch the
/route (launch screen) - go to
potm/:match_idroute - when user presses back go to
match/:match_idroute - when user presses back go to
homeroute
Basically I want to have this stack: home -> match/:match_id -> potm:/match_id and then popping from the top will bring me back at home
In the / page initState method I do the following
var matchId = getMatchId();
Get.offToNamed("/home"); // place home on stack and remove /
Get.toNamed("/match/" + matchId); // place /match/:match_id on stack
await Get.toNamed("/potm/" + matchId); // go to /potm/:match_id
this kind of works but in some devices I see a very fast transition from / to /home which I don't want to see
What is the best way to achieve my desired stack here?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
