Hey guys! Is there any implementation in Material3...
# compose
y
Hey guys! Is there any implementation in Material3 swipe to dismiss on LazyColumn?
Copy code
rememberDismissState
is missing in M3. Pls. any example or tutorial? I read the documentation for compose and material3 and I can’t find anything even on github. Thanks a lot 🙏🏻
Maybe you guys @Colton Idle or @Chris Sinco [G] ? I thing you both know everything about M3
j
y
uaaaaaaaa 🔥 🔥 🔥 🔥 🔥 🔥 🔥 🔥 ….. 🙏🏻 ❤️ 🙏🏻 Thank you @Jonas Kalderstam UR my hero! I’m going to try it!
j
no worries
y
That’s what I was afraid of. Does this really not exist in M3 androidx.compose.material.SwipeToDismiss? I need to use in lazycolumn. And implementing everything manually seems quite difficult to me
j
the link above shows how I did it and I use it in a lazylist also . just copy paste. shouldn't be too much you need to invent yourself
y
it’s always the same in M3 it gives me error Cannot access and in your code U use a lot of staff from m2
j
because they are not mutually exclusive
i also tries to remove m2 entirely initially but it's impossible because it doesn't contain everything. m3 seems to only deal with things that are connected to the theme. not merely functional things like SwipeToDismiss. for that m2 is still needed it seems
y
yes .. U R right. But if I have M2 library in project it causes a lot of problems with automatic importing components. It takes a long time to find the problem, why one can write elevation in Card, while there is nothing like that in M3, etc.
j
agreed. i removed it to fix all those issues manually before adding it again to be able to build properly
bit of a pain to be sure
y
I have already written a lot with M3 and I have already found a solution for almost everything. In addition to swipe to dismiss.
It is interesting that the pull to refresh solution has been in M3 for a long time, but swipe to dismiss has not
j
oh pull to refresh is in m3 ? nice. I've been using accompanist
c
Thanks for the feedback - tagging @Gurupreet singh who might have more context
g
Thanks Chris.
@yogaboy We will have M2-M3 migration guide coming very soon I will share the link with you once it's available and should help you with your concerns 🙂 Let me know if you have more feedback about M3.
y
@Gurupreet singh thank you very much. I look forward to the guide. For now, don’t you at least have a hint I could take? Where can I find rememberDismissState and DismissValue etc. in M3?
@Gurupreet singh 🙏🏻 Any progress with swipe to dismiss solution for M3, pls?
g
hey have replied to DMs please check 🙌