Dc7*_*Dc7 7 dart flutter flutter-dependencies flutter-layout
我正在创建线性百分比指标。我想在它周围实现圆形边框。
预期结果对比 实际结果
LinearPercentIndicator(
linearStrokeCap: LinearStrokeCap.roundAll,
progressColor: Colors.blue[400],
backgroundColor: Colors.grey[300],
),
Run Code Online (Sandbox Code Playgroud)
有什么解决方案可以使用 barRadius 作为 LinearStrokeCap 吗?
nag*_*nag 12
使用barRadius而不是linearStrokeCap. 由于LinearStrokeCap已弃用,他们建议使用barRadius.
更新的代码:
LinearPercentIndicator(
lineHeight: 30,
percent: 0.7,
barRadius: const Radius.circular(16),
progressColor: Colors.blue[400],
backgroundColor: Colors.grey[300],
),
Run Code Online (Sandbox Code Playgroud)
输出: