0

According to image , i have to implement a curved slider like below but i have no idea how to do that with CustomPainter and maths . i will appreciate if you can help me with that. i tried sleek_circular_slider but it give me semi circular slider.

The point is to move the angle across the slider smoothly in the desired slider line

enter image description here

Navid Shokoufeh
  • 341
  • 6
  • 21

1 Answers1

0

Luckily, a Curves class in Flutter allows you to create smooth animations between 2 values, without having to apply Math.

Look behind their code, to understand the math, or simply interact with the Cubic function to create your own specific curves, not just for the animation but the define the position from A to B.

This video has useful tricks about Flutter Animation.

You can also look at this answer in Stack Overflow that explains Moving along a curved path in flutter

Canilho
  • 944
  • 5
  • 11
  • This doesn't really address the original question. Can you elaborate how animations are related to this problem? – doneforaiur Aug 10 '23 at 17:54
  • 1
    I've edited my answer. Take a look at the last link I've provided, which answers how to use a path as a reference for animation. – Canilho Aug 10 '23 at 18:08