qlevar_router icon indicating copy to clipboard operation
qlevar_router copied to clipboard

WillPopScope not working?

Open hiroppi401 opened this issue 2 years ago • 2 comments

qlevar_router is so great router i ever use, i just confused how to doing something before pop, for example

  1. i want clear all getx controller before pop
  2. i want do some conditional pop or replace to other path

i need a guidance to achieve this, thanks before

hiroppi401 avatar Aug 09 '22 00:08 hiroppi401

Hi @hiroppi401, Thanks, I'm glad you liked it. To do what you are looking for, you can use middleware with 'CanPop' or with 'OnExit' Check this: here After the page is ready there and user clicks back, the canPop and OnExit methods will be called for every defined middleware on the route.

SchabanBo avatar Aug 10 '22 05:08 SchabanBo

Hi @hiroppi401, Thanks, I'm glad you liked it. To do what you are looking for, you can use middleware with 'CanPop' or with 'OnExit' Check this: here After the page is ready there and user clicks back, the canPop and OnExit methods will be called for every defined middleware on the route.

thank you sir, i'll try that

hiroppi401 avatar Aug 11 '22 02:08 hiroppi401