Skip to content

Add support for inverting a CircularNotchedRectangle to be drawn on the bottom of a path #151381

@arbaker2

Description

@arbaker2

Use case

Currently the CircluarNotchedRectangle class only supports drawing a circular notch on the top of a path, mainly for use in a BottomAppBar. This is a nice design feature and adding support for drawing this notch on the bottom of the path would allow for its use in more situations with more widgets.

Proposal

My proposal would be to allow for an optional argument in order to invert the CircularNotchedRectangle when calling the [getOuterPath] method on the object.

const CircularNotchedRectangle shape = CircularNotchedRectangle();
const Rect host = Rect.fromLTRB(0.0, 100.0, 300.0, 300.0);
const Rect guest = Rect.fromLTRB(190.0, 295.0, 210.0, 315.0);

final Path path = shape.getOuterPath(host, guest, inverted: true);

This would allow the [getOutterPath] method to keep the same default behavior while also allowing the notch to be drawn inverted as shown in the screenshot below.

Simulator Screenshot - iPhone 15 - 2024-07-07 at 11 46 12

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: duplicateIssue is closed as a duplicate of an existing issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions