diegoveloper / flutter_percent_indicator

Flutter percent indicator library
BSD 2-Clause "Simplified" License
679 stars 206 forks source link

Remove the default spacing on both sides #151

Open easonccc opened 2 years ago

easonccc commented 2 years ago

How to remove the default spacing on both sides when using LinearPercentIndicator MediaQuery.removeViewInsets( context: context, removeLeft: true, removeRight: true, child: new LinearPercentIndicator( width: 40, lineHeight: 6.0, percent: 0.5, backgroundColor: ColorUtils.color_F3F4F8, progressColor: ColorUtils.color_FFC74D, barRadius: Radius.elliptical(20, 20), ), )

nmdias commented 2 years ago

Not sure why there is a default non zero padding, but just set it to zero.

LinearPercentIndicator(
    padding: EdgeInsets.zero, // Add this line
)