Description
The new StarBorder has a genius 2-3 step lerp for most shapes, except Circle, where it works well except when eccentricity != 0
. I think it was forgotten in the implementation, as Oval is only a few weeks old. I propose adding the 2-way lerp to circle, so oval works. cc @gspencergoog
Related: in the upcoming BoderSide.only
PR, which may or may not be accepted, Star -> Circle is the only lerp that doesn't work, as it draws a path all the time. The other shapes draw a path until 50%, then their shape until 100%, so lerp is good (not great, might need a few fixes). I see two potential solutions:
- Add 2 step lerp for Oval (and eccentricity != 0).
- Add 2 step lerp for all circles.
If you fix oval only, in a hypothetical future, we might need to do if (multiBorder) 2-step lerp
for circle, which is also fine. Just telling you the plan.
Screen.Recording.2022-07-31.at.17.45.57.mov
Simple sample:
StarBorder(
side: BorderSide(color: Colors.yellow.withOpacity(0.5), width: 10),
).lerpTo(RoundedRectangleBorder(side: BorderSide(color: Colors.red.withOpacity(0.5), width: 10), 0.5)