Use PageRouter to switch between pages
The PageRouter requires Kirigami 2.12+.
And we need to reference page instances via pageRouter due to scope of id.
I was considering to use Kirigami.PageRouter.currentRoutes() instead of pageStack.currentItem() and currentPage variable but i think current implementation is enough for checking current page. If you have any advice about this please feel free to tell me.
p.s., Sorry for messy MR history. I was playing around with PageRouter rebasing commits without considering MR history.
Edited by Kitae Kim