Skip to content

CircularProgressIndicator draws outside of its bounds #3282

Description

@HansMuller

It appears that the stroked outline is just outside of its constraint rect. This makes it difficult to precisely control CircularProgressIndicator's size. I think it would be easier to manage this widget if enclosing it in a SizedBox assured that nothing would be drawn outside the box.

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Apr 12, 2016
  2. modified the milestone: on May 20, 2016
  3. HansMuller commented on May 30, 2018

    @HansMuller
    ContributorAuthor

    When drawing wide lines with Canvas x,y correspond to the center of the line. Perhaps CircularProgressIndicator isn't taking this into account.

  4. modified the milestones: , on Jan 7, 2020
  5. added
    P3Issues that are less important to the Flutter project
    on May 29, 2020
  6. modified the milestone: on Jun 1, 2020
  7. removed this from the milestone on Jun 16, 2020
  8. removed this from the milestone on Jul 7, 2020
  9. modified the milestone: on Jul 22, 2020
  10. removed this from the milestone on Aug 17, 2020
  11. Hari-07 commented on Feb 19, 2022

    @Hari-07
    Member

    Any clues as to how this could be fixed? I can try to contribute, if anyone has any ideas about what could potentially be causing this could help

  12. Hixie commented on Mar 23, 2023

    @Hixie
    Contributor

    The fix is probably to pad the widget with half the stroke width on each side, if we want to do it. However, it would likely be quite breaking since by now lots of apps depend on the exact behavior. Is it worth making this optional, or should we just not do it?

  13. AlexV525 commented on May 3, 2023

    @AlexV525
    Member

    However, it would likely be quite breaking since by now lots of apps depend on the exact behavior. Is it worth making this optional, or should we just not do it?

    @Hixie Can we identify if any internal tests or Golden tests rely on this?

  14. AlexV525 commented on May 6, 2023

    @AlexV525
    Member

    With #125945, supporting this will not be a breaking change. It takes the same design of BorderSide.strokeAlign which defaults to .center same as the current situation.

  15. github-actions commented on May 24, 2023

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  16. locked as resolved and limited conversation to collaborators on May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectframeworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions