Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Request for new functionality
View staffing
Description
This is an example of a roundedRect version of what would be nice to expose, however it doesn't support arbitrary shapes. Having one that supports arbitrary shapes would be useful.
```
fun Modifier.dashedRoundedRectBorder(
width: Dp,
color: Color,
cornerRadius: Dp,
intervals: FloatArray = floatArrayOf(10f, 10f),
phase: Float = 0f
): Modifier =
this.then(
Modifier.drawBehind {
val stroke = Stroke(
width = width.toPx(),
pathEffect = PathEffect.dashPathEffect(intervals, phase)
)
drawRoundRect(
color,
style = stroke,
cornerRadius = CornerRadius(cornerRadius.toPx(), cornerRadius.toPx())
)
}
)
```
There is a stackOverflow question that has over 70 upvotes for something similar