wwalkingg
07/21/2024, 6:39 AMModifier.shadow
, but it don't have enough parameters.
fun Modifier.shadow(
elevation: Dp,
shape: Shape = RectangleShape,
clip: Boolean = elevation > 0.dp,
ambientColor: Color = DefaultShadowColor,
spotColor: Color = DefaultShadowColor,
)
The image is Figma config.Joel Denke
07/21/2024, 8:07 AMwwalkingg
07/21/2024, 9:33 AMSkaldebane
07/21/2024, 9:53 AMshadow
Modifier is in reality just an implementation of Material elevation, not regular box-shadow.
You'll need to use a custom Modifier for that.
Here's an implementation that works on Android: https://github.com/GIGAMOLE/ComposeShadowsPlus/. The developer doesn't seem to be interested in supporting KMP for now, but it shouldn't be too hard to implement this on other platforms.wwalkingg
07/27/2024, 11:17 AMJoel Denke
08/02/2024, 3:21 PM