Hey all , Can anyone help how to draw a curved das...
# compose
w
Hey all , Can anyone help how to draw a curved dashed line with arrow in compose. (Similar to the below attached image)
r
In a DrawScope you can use drawPath() with a dashed path effect
The curve will be a Path with a cubic curve inside
For the arrow one way to do this is get the matrix at the end of tbe path using https://developer.android.com/reference/android/graphics/PathMeasure#getMatrix(float,%20android.graphics.Matrix,%20int)
(use getLength() to get the end of the path)
That'll give you a translation+rotation matrix to position a triangle at the end of the path
w
Any very similar implementation of my usecase which I can refer.
w
Already checked its bit confusing for me since I’m very new to canvas
y
You need to try and experiments.