Omprakash Chauhan
← All projects

FlutterShaper

A free visual path designer that exports Flutter CustomPainter code.

The problem

Custom shapes in Flutter are drawn with Path commands: a long list of moveTo, lineTo and cubicTo calls with coordinates. Writing those by hand is slow, and checking the result means running the app, nudging a number and running it again.

It gets worse when a designer hands over a curve from a vector tool. Someone has to translate it into Dart, and then designer and developer go back and forth on coordinates. I built FlutterShaper so you can draw the shape, see it, and copy the code that draws it.

How it's built

FlutterShaper itself is a React 19 app built with Vite, even though the code it produces is Dart. The editor canvas uses Konva.js through react-konva, Paper.js handles the geometry (boolean operations and other path maths), and Zustand keeps the editor state and undo history in the browser. Your designs stay in the browser.

The part I care about most is the export engine, because it decides whether the code you copy is any good. Every shape is first normalised to SVG path data and parsed into a list of commands. Those commands then map one to one onto Flutter Path methods: moveTo, lineTo, cubicTo, quadraticBezierTo and close. A separate step looks at the fill and stroke and writes the matching Paint object. Because the output is plain Dart with no package dependencies, you can paste it straight into a project.

In the editor you get a pen tool with linear and cubic Bezier support, draggable anchor points and control handles, and unite, subtract, intersect and exclude operations. The code updates in real time as you edit, and you can import an SVG to get Flutter Path code from it. You can copy a ready-to-use CustomPainter class, raw Path commands, or a version with sizing so the shape scales with its container. ClipPath and CustomClipper output is there too, and blobs and waves can export an AnimatedWidget.

It is free, with no sign-up.

What's next

Pasting code back into the editor so you can edit an existing shape is listed as coming soon on the site. The same site links to a few related tools: a gradient builder, a shadow generator, blob and wave generators, and an SVG to Flutter converter.

Links

By Om (Omprakash) Chauhan, a Flutter developer from India. More about me