Skip to content

Implement ClipRSuperellipse on backdrop filter #179125

@Hari-07

Description

@Hari-07

#177551 propagates all clips to the mutator stack , but the kBackdropClipRse case currently no-ops

The PlatformViewsController should be updated to implement the kBackdropClipRse case


Reproducible example repo

For this snippet:

Widget build(BuildContext context) {
    return ClipRSuperellipse(
      borderRadius: BorderRadius.circular(50),
      child: Container(
        width: 200,
        height: 200,
        decoration: BoxDecoration(
          color: Colors.black.withOpacity(0.2),
          borderRadius: BorderRadius.circular(500),
        ),
        child: BackdropFilter(
          filter: ImageFilter.blur(sigmaX: 10.0, sigmaY: 10.0),
          child: const Center(
            child: Text('Blurred block 1'),
          ),
        ),
      ),
    );
  }

The correct behaviour should clip the blur in the RSE shape but currently it produces, wherein the clip is completely ignored

Image

This is because in the rse case we are simply no-oping. The native code to handle this case needs to be implemented

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterengineflutter/engine related. See also e: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions