draw_your_image
0.12.1, released 8 weeks ago by tsuyoshichujo.com
A Flutter widget for creating customizable drawing canvases with a declarative API.
What it does
Provides a flexible drawing canvas widget that captures touch, stylus, and mouse inputs. It supports stroke management via state, custom smoothing algorithms, intersection detection, and custom painters.
AI-written summary of version 0.12.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to allow users to draw freely with fingers or styluses on a canvas.
- You need a controller-free, fully declarative drawing widget.
- You require device-aware drawing behaviors like stylus-only input or pressure sensitivity.
Skip it when
- You need built-in state management solutions like undo/redo out of the box (requires manual implementation).
- You are building complex vector graphics editing software.
Strengths
- Fully declarative API with no controllers required.
- Device-aware input handling for distinguishing stylus, finger, and mouse.
- Rich stroke data including pressure, tilt, and orientation.
Weaknesses
- Features like undo/redo and zoom/pan must be implemented by the app developer.
- Not documented for offline local persistence of canvas states.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
class MyDrawingPage extends StatefulWidget {
@override
_MyDrawingPageState createState() => _MyDrawingPageState();
}
class _MyDrawingPageState extends State<MyDrawingPage> {
List<Stroke> _strokes = [];
@override
Widget build(BuildContext context) {
return Draw(
strokes: _strokes,
onStrokeDrawn: (stroke) {
setState(() {
_strokes = [..._strokes, stroke];
});
},
);
}
}Alternatives
Packages that do the same job and could replace draw_your_image.
- salesiq_mobilisten
In-app live chat and knowledge base widget for Flutter.
71Compare - cell_calendar
A customizable Flutter calendar widget inspired by Google Calendar.
57Compare - resizable_widget
Widget that enables users to resize internal child widgets by dragging separators.
50Compare - scratcher
Scratch card widget which temporarily hides content from the user.
50Compare