oleksandrbalan / modalsheet

Modal Sheet library for Jetpack Compose
Apache License 2.0
121 stars 6 forks source link

Q&A: Do this library compatible with compose multiplatform? #30

Open darwineee opened 1 year ago

darwineee commented 1 year ago

As for the title, I am really interested in this library. I just want to make sure this lib is working with compose multiplatform (from JetBrains) or only jetpack compose? Thank you.

oleksandrbalan commented 1 year ago

Unfortunately I have only a little knowledge of the compose multiplatform, so this library is only jetpack compose as for now.

The main component is a FullscreenPopup, which is highly tied to the android (android.view.*, android.content.*, androidx.lifecycle.*). So this component must be "multiplatformed" to be able to migrate this lib to multiplatform.

I will try to investigate how it would be possible 👀

Are you mainly interested in Desktop, iOS or Web? Or everything? 😄

darwineee commented 1 year ago

Just Android and iOS. Hope this library can become "multiplatform" in the future. Thank you for your work! :)

oleksandrbalan commented 1 year ago

Thanks!

I tried to throw ModalSheet to the Compose Multiplatform template project and it kinda works if used with multiplatform Popup instead of custom FullscreenPopup. But there is some work need to be done with window insets and HW back button handling 🤔

But I am really impresed that it works at least somehow 😅

https://github.com/oleksandrbalan/modalsheet/assets/20944869/a5e13948-64e1-4f92-a91c-ee1421a15f15

oleksandrbalan commented 3 months ago

For multi-platform solution you can use https://composablescore.com/modal-bottom-sheet/.