- removed erroneous
simulatePressure
- Use
perfect_freehand
for much smoother lines (thanks to @mattrussell-sonocent) - BREAKING: Removed line customization parameters from widgets
- Upgraded dependencies (thanks to @wxxedu)
ScribbleNotifier.clear()
clears the drawing without resetting anything else (color, width e.t.c)
- Upgraded dependencies
- Added
ScribbleSketch
widget for just displaying a sketch without input functionality, no notifier needed!
- Upgraded dependencies
- Updated README to include the newest features
- Downgraded json_serializable due to a bug with freezed
- Custom ScribbleNotifiers now need to provide a GlobalKey which is used in the renderImage() method to access Scribble's RepaintBoundary
- Updated example to demonstrate image export.
- You can now export the Scribble to an Image
ByteData
using the ScribbleNotifiersrenderImage()
method!
- The pressure on web is overridden so the cursor matches the selected pen width!
ScribbleNotifier
now extendsScribbleNotifierBase
instead of implementing it as an interface.- Updated dependencies
You can now switch between different ScribblePointerMode
s, even at runtime.
This is very helpful for example, if Scribble lives inside a Scrollable and you want users to be able to navigate with their finger while drawing with their pen.
Check the updated example to try it out!
ScribbleNotifier
now has the option to set the sketch from outside after it has been constructed using thesetSketch()
method. You can even choose whether you want it to be committed to the undo history.- Added documentation to
ScribbleState
- Updated example
- Updated dependencies
- Removed the speed calculation using time due to precision issues
- Added scaleFactor to support zoomable canvases. This allows you to for example wrap the Scribble Widget in an InteractiveViewer, so that users can draw finer details.
- Points now remember their time to calculate speed more accurately
- Multiple fixes for drawing with real pens or touch
ScribbleState
can now be serialized to JSON
- speedFactor's value should now be higher for the same effect, the default value has changed to 0.4
color
property in state is now an int to allow for easy JSON
- Draw better line ends
- Removed marker-like blend mode for now due to performance and buggy rendering in some cases
- Eraser keeps pen width and the other way around
- Eraser doesn't autoselect anymore
- Undo doesn't undo color and stroke selection
- Fixed stupid bug with pointer exit
- Better behavior on pointer exit
- Reduced Dependencies
- Replaced kimchi package with the better suited history_state_notifier
- Fixed a bug with redo queue clearing
- BREAKING: The
drawPointer
parameter is now calleddrawPen
- You can now obtain the current sketch from the notifier.
If you want to store it somewhere for example you can call
toJson()
on it. - You can now pass a sketch to a
ScribbleNotifier
constructor to initialize it with an existing drawing. - Added
ScribbleNotifierBase
interface so you can write your own notifier that works with theScribble
widget - Added pressure curve support to the notifier
- Allows more customization in the scribble widget for how the lines are rendered
- Upped minimum flutter version to 2.5
- Back to flutter 2.2.3
- Upped minimum flutter version to 2.3
- meta dependency to hopefully work with analysis
- Added documentation
- Fixed dependencies
- Initial release