flutter_advanced_canvas_editor 2.3.0 copy "flutter_advanced_canvas_editor: ^2.3.0" to clipboard
flutter_advanced_canvas_editor: ^2.3.0 copied to clipboard

A powerful Flutter canvas editor with Photoshop-style layers, freehand drawing, drag-and-drop components, undo/redo, and PNG export. Works on all platforms.

2.3.0 #

  • Components are now measured after layout. Added CanvasController.componentSize() and componentRect(), and the rotate button (and rotateButtonRect()) now follows the measured component width instead of an assumed 50px. Objects narrower than 50px (e.g. SVG vehicles that shrink to their aspect ratio) get their rotate button next to them instead of floating away
  • Measured sizes are reported through onStateChanged, only when they change

2.2.0 #

  • Added CanvasController.rotateButtonRect(layerIndex, componentIndex, {iconsSize}) returning the rotate button bounds in canvas coordinates, so overlays (hints, tutorials) stay aligned with the button. CanvasWidget now positions the button from the same rect (no visual change)

2.1.0 #

  • Added per-component icon colour via the new CanvasComponentData class and iconColor parameter on addComponent() (backwards compatible)
  • Added canvas serialisation: toJson(), loadFromJson(), and hasContent; each component's asset path is stored so the canvas can be fully restored from JSON
  • Fixed rotate/delete action buttons appearing in exported PNGs
  • Fixed Gradle/Java compatibility in the example app (Gradle 8.7, AGP 8.3.2, Kotlin 1.9.0)

2.0.4 #

  • Added scaleAllPositions(double scaleX, double scaleY) to CanvasController — rescales every component's position across all layers by the given x/y ratios; useful when the canvas widget is resized and component coordinates need to be remapped to the new space. Hidden and locked layers are included. Fully backwards compatible (additive API).

2.0.3 #

  • Converted from Flutter plugin to pure Flutter package — now supports all platforms (Android, iOS, Web, macOS, Windows, Linux) without native code dependencies
  • Removed plugin_platform_interface dependency and deleted unused plugin boilerplate files
  • Fixed deprecated Color.withOpacity() → Color.fromRGBO() in painter
  • Replaced print() with debugPrint() in exportCanvas error handler
  • Added class-level dartdoc to CanvasController, CanvasWidget, and all public typedefs
  • Fixed prefer_const_constructors lint in canvas widget (Size constructor)
  • Suppressed library_private_types_in_public_api on createState() with inline ignore comment
  • Added library-level doc comment to the main barrel file
  • Filled in homepage field in pubspec.yaml
  • Improved pubspec description to better reflect all features
  • Rewrote README to show only a minimal quick-start snippet and API table; full example remains in example/lib/main.dart
  • Replaced outdated plugin boilerplate tests with real unit tests covering CanvasController and CanvasLayer (64 tests total, all passing)

2.0.2 #

CHANGELOG:

  • MAJOR FEATURE: Added Photoshop-style layer system with full backwards compatibility
    • Multiple named layers for organizing canvas content
    • Create, delete, duplicate, rename, and reorder layers
    • Per-layer drawing points and components
    • Layer visibility toggle (show/hide)
    • Layer opacity control (0-100%)
    • Lock layers to prevent editing
    • Merge layer down functionality
    • Clear individual layers
    • Global undo/redo that snapshots all layers together
    • Hidden/locked layers cannot be selected
    • New layer management API: createLayer(), deleteLayer(), renameLayer(), setLayerVisibility(), setLayerOpacity(), setLayerLocked(), reorderLayer(), duplicateLayer(), mergeLayerDown(), clearLayer()
    • Demo includes collapsible layer navbar with horizontal scrolling layer cards
    • Image Preview
  • Made onStateChanged callback nullable for easier testing
  • Removed redundant debug logs throughout codebase
  • Added comprehensive test suite (53 tests) covering all layer functionality

1.1.6 #

CHANGELOG:

  • Undo Calls onUndo?.call() when undo is triggered
  • Redo Calls onRedo?.call() when redo is triggered
  • Erase Calls onErase?.call() when erasing mode is enabled
  • TODO: export in different formats and colors
12
likes
160
points
228
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A powerful Flutter canvas editor with Photoshop-style layers, freehand drawing, drag-and-drop components, undo/redo, and PNG export. Works on all platforms.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_advanced_canvas_editor