pencil_kit 1.0.5
pencil_kit: ^1.0.5 copied to clipboard
A Flutter plugin that provides a iOS PencilKit widget on iOS.
Flutter iOS Pencil Kit #
Flutter plugin for using iOS Pencil Kit.
Note 📒 #
- This package only provides iOS implementation. If you try use widget of this package other than iOS, you see a Red warning box.
- iOS Pencil Kit is available from iOS
13.0
Supported Platforms 📱 #
- iOS
Features & Todo 🌟 #
- ✅ Drawing
- ✅ Show/Hide palette
- ✅ Undo/Redo
- ✅ Clear
- ✅ UI properties(background color, scrollability, isOpaque, etc...)
- ✅ Import/Export drawing data
- ❌ Manage drawing tools programmatically
Requirements ✅ #
- iOS: Deployment target >=
9.0
Setup & Usage 🎉 #
flutter pub add pencil_kit
Available Methods #
Methods available for PencilKitController.
| Method | Description | Throws |
|---|---|---|
| clear() | Clear canvas | X |
| show() | Show Palette | X |
| hide() | Hide Palette | X |
| redo() | Redo last drawing action | X |
| undo() | Undo last drawing action | X |
| save() | Save drawing data into file system | O |
| load() | Load drawing data from file system | O |
PencilKit Widget Parameters #
All the available parameters.
| Parameter | Description |
|---|---|
| onPencilKitViewCreated | A callback for platform view created. You can store PencilKitController from argument of this callback. |
| hitTestBehavior | iOS UIKitView hitTestBehavior |
| unAvailableFallback | A widget for render UnAvailable state. The default is A red box |
| alwaysBounceVertical | A Boolean value that determines whether bouncing always occurs when vertical scrolling reaches the end of the content. |
| alwaysBounceHorizontal | A Boolean value that determines whether bouncing always occurs when horizontal scrolling reaches the end of the content view. |
| isRulerActive | A Boolean value that indicates whether a ruler view is visible on the canvas. |
| drawingPolicy | The policy that controls the types of touches allowed when drawing on the canvas. This properties can be applied from iOS 14.0 |
| onToolPickerVisibilityChanged | A callback for tool picker visibility state changed |
| onRulerActiveChanged | A callback for ruler activate state changed |
Example #
Check example on pub.dev page or example project repo
Contributors ✨ #
Thanks goes to these wonderful people (emoji key):
MJ Studio 🤔 |
This project follows the all-contributors specification. Contributions of any kind welcome!