The linear gradient in the circular percent indicator always starts at the top and ends at the bottom regardless of the startAngle parameter. This is not appropriate if you want the gradient to start at the point where the progress bar starts and to end at the point where the progress bar ends.
Current (default) behaviour:
Newly implemented behaviour:
I added the parameter rotateLinearGradient whose default value is false to avoid breaking changes, and setting it to true enables the described functionality.
The linear gradient in the circular percent indicator always starts at the top and ends at the bottom regardless of the startAngle parameter. This is not appropriate if you want the gradient to start at the point where the progress bar starts and to end at the point where the progress bar ends.
Current (default) behaviour:
Newly implemented behaviour:
I added the parameter rotateLinearGradient whose default value is false to avoid breaking changes, and setting it to true enables the described functionality.
Usage example: CircularPercentIndicator( radius: 100.0, lineWidth: 10.0, percent: 0.75, startAngle: 45, rotateLinearGradient: true, circularStrokeCap: CircularStrokeCap.round, backgroundColor: Colors.grey, maskFilter: MaskFilter.blur(BlurStyle.solid, 3), linearGradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [Colors.orange, Colors.yellow], ), )
It would be great if we could have this optional behvaiour implemented in the official widget.