im having issues in flet 0.80.5 with my back button or view_pop.

async def view_pop(e): page.views.pop() top_view = page.views\[-1\] await page.push_route(top_view.route)

my on route change just does page.views.append() for whatever page i clicked and this to prevent double entries:

if len(page.views) \> 0 and page.views\[-1\].route == page.route: return

right now if my history is like this:

Home -> page2 ->page3 ->page2

i click back

Home -> page2 ->page3

then back again

Home -> page2

this is my views list. my url is also /page2 but i see the home screen.

another code i tried was

top_view = page.views\[-2\] await page.push_route(top_view.route) del page.views\[-2:\]

but same result

this doesnt happend when i just go from home -> page 2 -> page 3 and then back twice. then it does the right thing

Ad00bA's user avatar

New contributor

Ad00bA is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.