MatkovIvan / nav_cupcake

Multiplatform adaptation of Google's `basic-android-kotlin-compose-training-cupcake`
92 stars 6 forks source link

Open access to the global BackPressDispatcher for Desktop, iOS and Web #5

Closed pablichjenkov closed 6 months ago

pablichjenkov commented 6 months ago

In navigation-compose I would like to be able to access the global BackPressDispatcher. The only platform that offers a hardware back button is Android (the web offers a back/forward navigation but semantics are a bit different). That means most developers will add their custom UI to handle back press and it will be very handy to reuse the built in BackPressDispatcher and not having to create our own. Not sure if this is the right repo to write this issue, perhaps should open it in compose-multiplatform repo?

MatkovIvan commented 6 months ago

Yep, that repo is valid one.

Regarding the feature - it will be solved by https://github.com/JetBrains/compose-multiplatform/issues/4419