Skip to content

API reference

Choose a reference by the object or operation you are working with. The getting started guide covers your first canvas.

The object model

ObjectResponsibility
DiagramDocumentImmutable authored shapes, standalone text, connectors, parent relationships, text stories and styles.
FramedElementShared placement and transform contract for shapes and standalone text.
TextElementStandalone rich text with a required story and no shape appearance fields.
TextElementDefinitionStandalone text bounds, layers, sizes, and interaction capabilities, exposed through ShapeRegistry.text.
ShapeDefinitionOne shape type: outline, layers, text regions, ports, defaults and interaction capabilities.
ShapeRegistryImmutable, validated collection of definitions, plus connector capabilities.
ShapeElement / ConnectorElementAuthored instances with stable IDs. A shape's type selects its definition.
DrawingSessionCanonical state, resolved scene, commands, history, configuration, subscriptions and lifetime.
DrawingConfigurationCanvas policy, background, grouped grid options, rotation increments, paint detail, overlays, effects and integration callbacks.
DrawingGridConfigurationGrid visibility, snapping, spacing and pattern; a value inside the drawing configuration.
DrawingCanvasThe bounded Flutter widget that displays and edits one session.

A session supports one mounted canvas at a time. Content operations also work without mounting it; camera and visual animation commands need a mounted canvas. Separate sessions are possible for separate editors or agent work, but shared-document synchronization, merging and collaborative history are not provided automatically.