A flutter package for drawing on a canvas with an api provided for serialization and deserialization of the drawn data.
- Sketch scribbles
- Draw shapes (rectangle, circle, triangle, star)
- erasing
- supports erase by area or drawing
- serialization and deserialization of drawn data
flutter_drawio_example.mov
Add it to your pubspec.yaml file under dependencies like so:
dependencies:
flutter_drawio: ^1.1.0
or use commandline
flutter pub add flutter_drawio
then import it in your dart file
import 'package:flutter_drawio/flutter_drawio.dart';
final DrawingController controller = DrawingController();
@override
void dispose() {
//don't forget to dispose the controller
controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: DrawingCanvas(
//required param
size: Size(
MediaQuery
.of(context)
.size
.width * 0.9,
MediaQuery
.of(context)
.size
.height * 0.9,
),
controller: controller,
),
);
}
To create issues, prs or otherwise contribute in anyway see contribution guide . See our roadmap here