canvas_editor library
Classes
- BackgroundNode
- Background Fill stored as a node. Not selectable via hit-testing; use product language "background fill" in Host UI, not "background node".
- CanvasEditorController
- Primary Host API for the Canvas Editor Engine.
- CanvasEditorState
- Immutable snapshot of Engine state for Host UI (toolbars, panels).
- CanvasEditorWidget
- Zero-chrome embeddable canvas. Host UI wraps this widget and drives it through controller.
- CanvasImageLoader
- Resolves image pixels for the live canvas and PNG export.
- CanvasImageReference
- Portable image reference: local file path and/or Host assetId.
- CanvasTheme
- Selection chrome for CanvasEditorWidget (borders, resize handles, rotation stem).
- CoordinateSystem
- Maps between Design Document coordinates and on-screen viewport coordinates.
- CustomNodeRegistry
- Per-Controller registry of CustomNodeTypes.
-
CustomNodeType<
T extends DesignNode> - Registers a custom Node type with JSON + widget builders for Host extensions.
- DesignDocument
- Persisted canvas content: size plus ordered nodes (JSON-serializable).
- DesignNode
- A positioned, selectable item on a DesignDocument (text, image, or custom).
- ImageNode
- Image Node backed by a local file and/or Host-resolved assetId.
- TextNode
- Editable text Node. Default fontSize is 48.
Functions
-
decodeDocumentColor(
String hex) → Color - Decodes a Document Color hex string to a Flutter Color.
-
encodeDocumentColor(
Color color) → String -
Encodes a Flutter Color as a Document Color hex string (
#AARRGGBB).
Typedefs
-
CanvasImageProvider
= ImageProvider<
Object> Function(CanvasImageReference ref) -
Host callback that maps an
assetIdreference to an ImageProvider.