Closed flomingdev closed 2 years ago
Same problem here.
Can anyone add a minimum code to reproduce the issue?
Here is a static example to reproduce:
LinearPercentIndicator( width: 150.0, lineHeight: 20.0, barRadius: Radius.circular(10), percent: 0.05, )
As soon as the percentage goes very low (eg. 0.05 here), the progress bar behaves like shown in the first post.
Thanks for taking on the issue!
Can you add a complete minimum example that I can run here?
I figured out that the problem comes from the barRadius parameter: If the progress bar itself is too small to fit the rounded corner radius, the bar will be displayed erronous.
I figured out that the problem comes from the barRadius parameter: If the progress bar itself is too small to fit the rounded corner radius, the bar will be displayed erronous.
@xlDownxl do you want to send a pull request?
@diegoveloper I only located the problem, I don't have a fix for it. Personally, I am not so familiar with the Drawer, so I am not sure if I can find a solution to this problem soon.
Same problem here.
這是一個重現的靜態示例:
LinearPercentIndicator( width: 150.0, lineHeight: 20.0, barRadius: Radius.circular(10), percent: 0.05, )
一旦百分比變得非常低(例如這裡的 0.05),進度條的行為就像第一篇文章中顯示的那樣。
感謝您處理這個問題!
LinearPercentIndicator( padding: EdgeInsets.zero, lineHeight: 22, percent: 0.05, barRadius: const Radius.circular(16), progressColor: Colors.red, backgroundColor:Colors.grey[200]),
please add a complete minimum example that I can run here
@diegoveloper Diego, really no need for an example. Just set your bar in your own example to 1-5 percent.
Here's another image. If the percentage value is low, the bar will be drawn outside the background.
See https://github.com/diegoveloper/flutter_percent_indicator/pull/154.
All that was needed was to clip the bar with its own background.
The progress should be inside the linear bar. How can we resolve this kind of problem? Does anyone have some workaround solutions? Thanks!