In response to a reply given to another question the user parkorian asked:
what if you want to access to that scrollController from another page? Let's say, I am in pageTwo and when I press a button I want it to push pageOne and scroll down to a certain position –
There was no answer on that page sadly, So my question:
I want the UI to automatically scroll to the mapped Widget [from another page]. Just like we see that effect in websites. Let's say, I am in pageTwo and when I press a button I want it to push pageOne and scroll down to a certain position
How can I achieve this?
1 Answer 1
You can pass a CallBack Function from your Page1 to Page2 and in your Page2 you can call it like this:
callback.call();
In your callBack (which you define in Page1) you just say scrollController.jumpTo or scrollController.jumpToPage