Open blingkonnerth opened 4 months ago
Brilliant idea. Would you consider opening a PR?
I wish I could, but I don't quite understand where exactly I have to call it .. I will give it another try later this week.
@ulusoyca I looked into it but wasn't able to get it properly done. When looking into it, I think instead of just passing the id
, passing the whole page
would be even better for more flexibility?
@MbIXjkee is currently managing the work that will add internal navigation system to the modal. Adding a navigation observer will solve this. Expected to be released in the 0.8.x.
"interntal navigation observer" sounds perfect! @MbIXjkee 🫶
Correction: It is a long work and expected in 0.9.x https://github.com/woltapp/wolt_modal_sheet/pull/271
I would love have a
onPageChanged
- Callback.I would expect it to look something like this:
This came up when I wanted to build in
tracking
for the bottomsheet. I had this method before:But this will obviously not work when dealing with dynamic routes or even when
pushing
orpopping
. It will only work if all pages are constant.I guess I could get hacky here and still manage to make it work, but everything would be solved, by a simply
onCurrentPageChanged
- callback (getting the id of the new page and index would be crucial here).