[英]I want to give border Color to Linear percent indicator in Flutter
I've tried to give border to linear progress indication by using container but it is not working for me.. Here is the Code.我试图通过使用容器为线性进度指示提供边框,但它对我不起作用。这是代码。
Container(
width: Get.width*0.8,
decoration: BoxDecoration(
border: Border.all(
color: Colors.black
),
),
child: LinearPercentIndicator(
// width: Get.width*0.8,
lineHeight:Get.height*0.04,
percent: percent/100,
backgroundColor: Colors.grey,
progressColor: AppColors.orangeTextColor,
center: Text(
percent.toString() + "%",
style: TextStyle(
fontSize: 12.0,
fontWeight: FontWeight.w600,
color: Colors.black
),
),
),
),
And here is the output:这是 output:
LinearPercentIndicator
comes with a default padding of EdgeInsets.symmetric(horizontal: 10.0)
. LinearPercentIndicator
带有EdgeInsets.symmetric(horizontal: 10.0)
的默认填充。 Changing it to zero like this will fix it:像这样将其更改为零将修复它:
LinearPercentIndicator(
padding: EdgeInsets.zero,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.