Flutter 3.x+Live previewOpen in editor

Flutter Shape Library

Copy-paste recipes for the custom shapes Flutter does not ship: borders, polygons, stars, hearts and curved headers. Each recipe has a live preview, sliders for its parameters, Dart code that updates as you move them, and a button to open the shape in the editor.

Shape recipes

Recipes with their own tutorial

These shapes already have a full walkthrough on the blog. Read the tutorial, or open the shape in the editor and change it visually.

ClipPath, ShapeBorder or CustomPainter?

Most recipes give you two versions of the same path. A ClipPath with a CustomClipper cuts a widget (an image, a gradient container) to the shape. A ShapeBorder makes the shape the widget's own surface, so Container, Card, Material and AppBar can keep their shadow, border and ink ripple. A CustomPainter simply draws it, which suits standalone icons and outlines such as the dashed border.

The full comparison, with the same path in all three, is in CustomPainter vs ClipPath vs ShapeBorder.

Other generators