diegoveloper / flutter_percent_indicator

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

Using fillColor creates a rectangular fill not circular #189

Closed aneeskA closed 1 year ago

aneeskA commented 1 year ago

Sample code

CircularPercentIndicator(
        radius: 25.0,
        lineWidth: 3,
        center: Icon(
          Icons
              .workspace_premium_outlined,
          color: Colors.white,
        ),
        progressColor: Colors.white,
        backgroundColor:
            Colors.deepPurple.shade400,
        fillColor: Colors.green,
        percent: 1.0,
      ),

Screenshot

image

The last green filled corresponds to the above code. Same as https://github.com/diegoveloper/flutter_percent_indicator/issues/125

aneeskA commented 1 year ago

@diegoveloper Please take a look at this if you can.

diegoveloper commented 1 year ago

Can you add a ClipOval above CircularPercentIndicator?

aneeskA commented 1 year ago

Wow! I didn't know such a widget existed! It fixes the problem :)

ClipOval(
    child: CircularPercentIndicator(
      radius: 25.0,
      lineWidth: 3,
      center: Icon(
        Icons
            .workspace_premium_outlined,
        color: Colors.white,
      ),
      progressColor: Colors.white,
      backgroundColor: Colors
          .deepPurple.shade400,
      fillColor: Colors.green,
      percent: 1.0,
    ),
  ),

result

image
aneeskA commented 1 year ago

@diegoveloper May be add an example to the README for this specific case?

diegoveloper commented 1 year ago

Great

diegoveloper commented 1 year ago

Would you mind to send a PR?

On Sun, Jan 1, 2023, 2:33 PM aneeskA @.***> wrote:

@diegoveloper https://github.com/diegoveloper May be add an example to the README for this specific case?

— Reply to this email directly, view it on GitHub https://github.com/diegoveloper/flutter_percent_indicator/issues/189#issuecomment-1368516270, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABFL3UHLDY6L3EILLTPQOVLWQHLZXANCNFSM6AAAAAATOIL6KI . You are receiving this because you modified the open/close state.Message ID: @.*** com>

aneeskA commented 1 year ago

Would you mind to send a PR?

Yes, will do that. ✌️

Ngochiendev commented 7 months ago

great, Thank you for providing the solution