Skip to main content
JimFouch
Associate III
Dec 12, 2019 9:22 PM UTC
Solved

Getting the currently Selected Page from a Swipe Container

I'm trying to save the current selected page for a SwipeContainer in the tearDownScreen handler when a screen closes, so when that screen reopens the user is taken back to the same page they left it on.

However, I can't seem to find a way to access what the currently selected page is for the SwipeContainer. I see there is a method to set the selected page. I also see that the widget maintains the CurrentPage internally. But, I can't seem to get access to it from the view.

This topic has been closed for replies.
Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
Jan 9, 2020 8:07 AM UTC

H Jim,

There's no method for getting the current page, it's something we'll add i think. Until then, you can just add the function yourself - The code is open. It should be pretty apparent what to return, i think.

/Martin

3 replies

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
Jan 9, 2020 8:07 AM UTC

H Jim,

There's no method for getting the current page, it's something we'll add i think. Until then, you can just add the function yourself - The code is open. It should be pretty apparent what to return, i think.

/Martin

JimFouch
JimFouchAuthor
Associate III
Jan 11, 2020 5:59 AM UTC

Martin,

Yes I was able to add the function myself and it's working well.

Thanks for your reply.