I need to use `rememberRipple()` in a shared modul...
# compose-wear
z
I need to use
rememberRipple()
in a shared module. Is it OK to bring in material as
implementation
(not
api
) even though the module is eventually consumed by both phone & wear variants that make use of material/material-wear? Docs advice against mixing these up, but afaik thats just to ensure that you dont make use of the wrong
MaterialTheme
(etc); material-wear itself depends on material?
y
I think that just requires material-ripple, not everything. You are correct on the reasoning, both theme and some basic types like text.
If I remember our previous case, we found a cleaner way using existing composables. Can you describe you case?
z
Thank you, I wasnt aware that material-ripple was a thing. Id much rather pull in just that! :) For my particular use case: I have my own versions of
Modifier.clickable
with some QOL features, but most importantly it makes it possible for the caller to specify whether the indication should be borderless - without depending on material/ripple. My design system depends on material, my apps have no idea about material; they just consume the composables that the system provides.
j
@yschimke is right - its ok to use core material-ripple we didn't need to have a wear specific version of that
z
So glad I asked, thank you both! :)