I figured already how to transfer data from one page to another but I found a challenge...
- A user has to select one of the matches from pg1 (footballEvent) to go to page2(footballScreen)
- Images displayed on page2 should be the same as the ones previous selected from pg1,
This is the code I wrote to pass data from pg1 to pg2. [6]: https://i.stack.imgur.com/u2etq.png the problem with this approach is: leftPlayer[index], because only the data on the left it's updated on pg2, but not the data on the right side.
This is the code I used inside pg2 to update a team's image data.imageUrl. [5]: https://i.stack.imgur.com/PSkFf.png
This is how I structured the matches: (and I believe this could be the problem because I'm not using the rightPlayer data on the code(3rd point) to pass data to the 2nd pg). leftPlayer and rightPlayer
So, how can I fix this?
question from:https://stackoverflow.com/questions/65930794/how-to-pass-data-from-one-page-to-another-with-flutter