[SOLVED] How to make color keep filling and walking from point to the same point in circle

Issue

This Content is from Stack Overflow. Question asked by Mohammed Hamdan

How to make the red color keep filling and walking from point to the same point in circle like following

enter image description here

let’s say A is the starting point, red color keep filling and walking till it complete the circle in animation



Solution

You can use TweenAnimationBuilder and CircularProgressIndicator for achieving this.

TweenAnimationBuilder(
        tween: Tween<double>(begin: 0, end: 1),
        duration: const Duration(seconds: 3),
        builder: (BuildContext context, double value, _) {
          return CircularProgressIndicator(
            value: value,
            color: Colors.red,
            backgroundColor: Colors.white,
          );
        },
      ),


This Question was asked in StackOverflow by Mohammed Hamdan and Answered by Prateek Jain It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?