Open shamilovtim opened 4 years ago
I think using num should be fine. I'm not entirely clear on what is going on in the gif though.
We would have to toDouble the num though because the underlying path API expects doubles
@dnfield sorry I should have explained better! in the fl_chart library the click triggers a touch indicator on click. in that repaint you can see (multiple?) repaints happening where dashed path is doing arithmetic, painting, then painting again. this issue goes away when integers are passed to dashedPath. it's also not present with all doubles but probably the majority of them.
also by "integers passed to dashedPath" i was referring to 10.0, 2.0, etc.
I narrowed this down to dashPath because intuitively even if our Path was changing, this would not change the size and margin of the dashes. furthermore, we know that the dash List we're passing is definitely not changing. so it could only be dashPath causing this bug from the looks of things. changing the numbers to whole numbers made it go away. also a couple of different doubles did not present the bug either but it seemed like the majority of them did.
the dashed path is not playing nice with doubles. here's a gif that shows the repainting going on when doubles are provided. i have had to enforce a list of integers in the mean time. toward that end, it would be nice if the circular array did not require doubles as that's not actually a requirement.
<num>
would be better.related: https://github.com/imaNNeoFighT/fl_chart/pull/171