I'm trying to replicate a custom UI shape in Flutter, as shown in the red-marked area of the attached image. The design involves layering an icon over a uniquely clipped or curved container using a Stack. However, I'm unsure how to achieve this shape programmatically.
I’ve experimented with ClipPath
, CustomPainter
, and Positioned
widgets inside a Stack
, but I’m struggling to match the exact curvature and alignment seen in the image.
I want to create a reusable widget that mimics the red-marked shape, with the icon precisely positioned and the background clipped or styled accordingly. Ideally, the solution should be modular and responsive across screen sizes.
Stack
: a simpleContainer
orDecoratedBox
withShapeDecoration
will do a trick