flet
flet copied to clipboard
CustomPaint control
https://www.raywenderlich.com/25237210-building-a-drawing-app-in-flutter https://medium.com/flutter-community/a-deep-dive-into-custompaint-in-flutter-47ab44e3f216
Yes please! Considering using Flet as the go-to GUI tool for my introductory Python course, and a painter would be an invaluable tool for my students to play around with.
Sure, my only concern is to how to deal with a canvas's "size" property which is available on Flutter side in paint() method and, presumably, be useful on a Python (server) side. 😕
Maybe we could offer two options:
- Flet developer knows the size of the canvas (say, it's a widget with page's width/height or a widget with a fixed size) and can provide drawing instructions right away.
- Flet developer doesn't know canvas size, so their provide drawing instructions in
custom_paint.on_paintevent handler which brings canvas size in its event object.
https://flet.dev/blog/canvas