Skip to content

Circular-shaped decorations are not properly clipped #13675

@sroddy

Description

@sroddy

Steps to Reproduce

I'm getting visual glitches using this widget structure:

new Container(
      decoration: new BoxDecoration(
        color: color,
        shape: BoxShape.circle,
        border: new Border.all(
          color: Colors.white,
          width: 2.5,
        ),
      ),
      child: new Center(
        child: new Text(
          "$index",
          style: theme.textTheme.body1.apply(color: textColor),
        ),
      ),
    );

image

As you can notice, the background color of the decoration is slightly overflowing the circular border. I've tried in different ways (e.g. using ClipOval) but the result is always the same.

I think this behaviour, even if intended, is not what a developer/designer would expect.

Is there a way to properly achieve the expected result?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listcustomer: crowdAffects or could affect many people, though not necessarily a specific customer.dependency: skiaSkia team may need to help usengineflutter/engine related. See also e: labels.found in release: 3.7Found to occur in 3.7found in release: 3.9Found to occur in 3.9frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions