'LinearStrokeCap' is deprecated and shouldn't be used. This property is no longer used, please use barRadius instead

387

Use barRadius instead of linearStrokeCap. as LinearStrokeCap is deprecated they are suggesting to use barRadius.

Updated code :

LinearPercentIndicator(
  lineHeight: 30,
  percent: 0.7,
  barRadius: const Radius.circular(16),
  progressColor: Colors.blue[400],
  backgroundColor: Colors.grey[300],
),

Output:

enter image description here

Share:
387
Dc7
Author by

Dc7

Quick Starter & Self Learner.

Updated on January 03, 2023

Comments

  • Dc7
    Dc7 over 1 year

    I am creating Linear Percent Indicator. I want to achieve rounded borders around it.

    Expected Result Vs. Actual Result

    enter image description here

    My Code

    LinearPercentIndicator(
                linearStrokeCap: LinearStrokeCap.roundAll,
                progressColor: Colors.blue[400],
                backgroundColor: Colors.grey[300],
     ),
    

    Error

    enter image description here

    Any Solution

    Any solution to use barRadius as LinearStrokeCap?