extension_api library
What Flutter extension authors need: DiagramFlutterExtension, its canvas host and behavior, shape widgets, key bindings, property editors, effect definitions and the Flutter text layout and output backends.
Import it alongside the application library,
package:vyuh_diagram_flutter/vyuh_diagram_flutter.dart, which it does not repeat.
Classes
- AuthoredPathOutline
- A resolved instance-authored stroke produced by the closed shape grammar. Points are never interaction handles; the shape frame remains the only transform authority.
- BooleanValueField
- A true or false field.
- ChoiceValueField
- A fixed set of text options, displayed as a choice control.
- ColorValueField
- An unsigned ARGB color, stored as a JSON integer like other color values. Subclasses can narrow accepts while retaining the shared color editor.
- ConnectorLabelingCapability
- What labels a connector type allows, and how they are sized and styled.
- DiagramActionPresentation
- A command without a value, shown as a button, or as an icon button when the property has an icon.
- DiagramAppearanceEditing
- Inspector editing bounds; authored/imported appearance is not rewritten.
- DiagramArrowheadDefinition
- Normalized terminal geometry shared by all renderers. X measures backward from the tip in units of marker height; Y measures perpendicular displacement in units of marker width.
- DiagramArrowheadRegistry
- Frozen named marker geometry. Duplicate identities reject assembly.
- DiagramBorder
- Shared by outer edges and row/column separators. A zero width hides an edge.
- DiagramCamera
- Viewport mathematics and navigation over one controller's camera.
- DiagramCanvasBehavior
- Specialized behavior participates in the canvas's ordered input pipeline.
- DiagramCanvasExtensionHost
- What a mounted canvas offers its extensions beyond the controller.
-
DiagramChoicePresentation<
T> - One of the options a subject offers.
- DiagramColorPresentation
- A color with alpha.
- DiagramConnectorBendEditor
- Optional route behavior. A provider may extend other installed routes, such as promoting a straight segment to a curve through its midpoint handle.
- DiagramConnectorBendRequest
- Canonical baseline and resolved world coordinates for a bend gesture.
- DiagramConnectorControlEditor
- Optional editing behavior for a route's control points or waypoint segments.
- DiagramConnectorControlRequest
- Immutable gesture baseline passed to an installed route control editor.
- DiagramConnectorDefinition
- One connector type: its editing, labeling and creation defaults. ConnectorElement.type selects it; the route is chosen independently.
- DiagramConnectorEditing
- Connector inspector bounds, independent of authored/imported route intent.
- DiagramConnectorEndpointPolicy
- Optional approach policy for center bindings. Null retains the center as the authored route terminal, allowing core to clip the sampled path later.
- DiagramConnectorEndpointRequest
- World geometry for a whole-shape center binding. A route policy may choose a boundary-facing target; core remains responsible for the actual outline.
- DiagramConnectorLabelTextTarget
- The story of one ConnectorLabel of a ConnectorElement.
- DiagramConnectorRouteCapabilities
- Behaviour a route offers beyond live resolution.
- DiagramConnectorRouteDiagnostic
- Why a published route differs from what its provider intended.
- DiagramConnectorRouteFallback
- Degraded but valid geometry, published with a reason the UI can surface.
- DiagramConnectorRouteGeometry
- One sampled path shared by painting, export, hit testing and labels. Core performs owner clipping and marker fitting after provider resolution. This is the successful DiagramConnectorRouteResult.
- DiagramConnectorRoutePlanner
- Optional bounded planning behavior. Successful geometry retains the authored route in its unrounded waypoints; any other result publishes nothing and its reason explains the denial.
- DiagramConnectorRoutePlanningContext
- Read-only scene queries available during an explicit route planning command.
- DiagramConnectorRoutePostProcessor
- Batch post-processing for routes planned together. Returned waypoints replace the planned ones by connector id and must keep both terminals; omitted ids keep their planned route.
- DiagramConnectorRouteProvider
- Portable route contribution. Core retains binding, clipping and publication.
- DiagramConnectorRouteRegistry
- Immutable route assembly; duplicate or malformed contributions reject early.
- DiagramConnectorRouteRequest
- Resolved endpoint input for a portable connector route algorithm. Providers return geometry only and cannot mutate document or editor state.
- DiagramConnectorRouteResult
- Outcome of routing one connector.
- DiagramConnectorRouteValidator
- Route-specific authored-data admission, before scene publication.
- DiagramConnectorTool
- Creates a connector of connectorType by dragging from a source to a target.
- DiagramConnectorUnroutable
- No usable geometry for this request.
- DiagramContentCodec
- Versioned persistence of one extension-owned authored content type.
- DiagramContentCodecContext
- Shared paragraph encoding supplied by a document format adapter.
- DiagramContentDefinition
- One structured content production, installed with its layout and persistence. Model cloning and canonical paragraph projection remain owned by the TextStoryContent implementation returned by its codec.
- DiagramCustomPresentation
- A value whose editor is chosen by the property's value type; without an editor for that type an inspector shows the property's summary.
- DiagramDocumentBatch
- Element edits against one snapshot, derived as a single proven successor.
- DiagramDocumentChanges
- Canonically proven changes between immutable document snapshots.
- DiagramEraserTool
- Erases elements the pointer passes over, removing them together when the gesture ends.
- DiagramExtensionRegistry
- The one place installed extensions become a grammar.
- DiagramFillPresentation
- No fill, a solid color, or a linear or radial gradient.
- DiagramFlutterExtension
-
An extension with Flutter contributions, installed like any other in the
controller's
extensions; a mounted DiagramCanvas uses the installed Flutter extensions. - DiagramFrameClock
- Demand-driven frame time shared by path effects and custom shape overlays.
- DiagramFrameClockLease
- A disposable request for animation frames from the canvas's shared clock.
- DiagramFreehandTool
- Draws a freehand stroke that follows the pointer.
- DiagramGesturePreview
- What one gesture sample previews: the verbs to perform, each time from the gesture's baseline, and the selection to show.
- DiagramIcon
- The icon of a declaration, such as a property's toolbar button or a tool's palette entry.
- DiagramIconGlyph
- Draws the portable glyph of a DiagramIcon like an Icon: at the ambient IconTheme size and color unless size is given. An icon without a glyph leaves the same space empty.
- DiagramKeyBinding
- One exact key chord that performs a verb, optionally restricted to a shape, text type, or slot. Command means Meta on macOS and Control elsewhere. Repeats are ignored.
- DiagramMarkerStroke
- Portable line geometry for a marker, in coordinates relative to its box.
- DiagramMeasuredTextLine
- A paragraph shaper's line before shared slot placement and alignment.
- DiagramModelCodecs
- Frozen codecs shared by a model registry and its document format adapters: authored contents by content type and texts by the type of the attributes they persist.
- DiagramMoveAdjuster
- Adjusts a proposed selection move, for example to align it with its neighbors. Interactive hosts install adjusters from extensions; a headless caller passes one to the same move preview.
- DiagramMoveAdjustment
- The movement a DiagramMoveAdjuster settles on, with the guides that explain it.
- DiagramMoveGuide
- Transient world-space guide line shown while a move is adjusted, such as an alignment snapline; never part of the document.
- DiagramMoveRequest
- A proposed move of framed selection bounds, offered to a DiagramMoveAdjuster before it previews.
- Navigation-only input. Camera gestures are handled by the surface adapter.
- DiagramNumberPresentation
- A number between min and max, changed in steps.
-
DiagramOutputAdapter<
Snapshot> - Output adapter for an immutable snapshot supplied by the owning engine. The snapshot type is a parameter so foundational types never depend on session or resolved-layout implementations.
-
DiagramOutputSnapshot<
Scene> - Immutable document and its corresponding resolved scene, owned by the engine.
- DiagramPairPresentation
- An x/y point or a width/height size, edited axis by axis.
- DiagramParagraphSplitPlan
- Paragraph templates whose identities, content, and regions remain unchanged. A missing trailing template transforms the paragraph without splitting it.
- DiagramParagraphTextLayoutEngine
- Owns story offsets, content slots, spacing, and vertical placement for every paragraph shaper, including deterministic headless measurement.
- DiagramPlannedConnectorRoute
- One successfully planned route in a reroute batch.
- DiagramPortShapeDefinition
- Normalized port-marker geometry shared by all renderers.
- DiagramPortShapeRegistry
- Frozen named port geometry. Duplicate identities reject assembly.
- DiagramProperties
- Resolves which properties apply to a selection.
-
DiagramProperty<
S, T> - One editable property of a subject: its key, label and group, how to read its value, the verb that sets it and how an inspector presents it.
- DiagramPropertyEditor
-
Renders the custom properties whose value type is
Tin an inspector. - DiagramPropertyGroup
- A titled section of related properties.
-
DiagramPropertyOption<
T> - One option of a choice property.
- DiagramPropertyPresentation
- How an inspector presents a property's value, one kind per value shape.
- DiagramPropertyScope
- What the inspector is editing: the selected elements, a connector label, the text being edited, the next shape of a creation tool, or the canvas.
- DiagramPropertySource
- Anything that contributes properties, resolved for what is being edited.
- DiagramPropertySpacing
- The space around a property section: lead before it, header under its title and trail after it. A null trail follows a titled section with a section gap and an untitled one with a control gap.
- DiagramPropertyVisibility
- Which properties an inspector offers, by group or by key.
- DiagramRouteOption
- One typed, JSON-serializable option a connector route accepts, declared by a ValueField like a shape's values.
- DiagramRouteOptionsSchema
- Typed options a route provider declares. Inspectors render them, commands validate edits against them, and JSON stores their values verbatim.
- DiagramSelectionTool
- Selects, moves, resizes and rotates elements, and selects by marquee on empty canvas.
- DiagramShapeTextTarget
- The story of a ShapeElement.
- DiagramShapeThumbnail
-
An offscreen vector recording of a shape
definitionregistered inregistry, in authored colors adapted asthemeadapts them on a canvas. Recording never rasterizes or reads back the browser's shared graphics surface. The owner must dispose it after the last CustomPaint using it is unmounted. - DiagramShapeTool
- Creates any registered shape; no built-in shape identifiers are special.
- DiagramShortcut
-
One key with the modifiers held with it, such as
Ror⇧T. - DiagramSnapSettings
- Direct-manipulation snapping the engine applies while editing: the rotation increment Shift snaps to and the screen radius within which a dragged connector end snaps to a port. Implemented by the editor's options; without one installed the engine uses DiagramSnapSettings.standard.
- DiagramStandaloneTextTarget
- The story of a TextElement.
- DiagramTextCodec
- Versioned persistence of the paragraph and run attributes one text definition owns, such as rich text's lists and marks. Attributes are dispatched to the codec whose type they declare.
- DiagramTextDefinition
- The text filling a text slot: what it admits and how it edits and presents.
- DiagramTextEditResult
- One canonical story mutation and the collapsed story offset that follows it.
- DiagramTextFontSizeRange
- Font-size editing bounds shared by commands and controls. These constrain editing, not imported or already-authored run sizes.
- DiagramTextInputShortcutResult
- The canonical result of recognizing an inline text input shortcut.
- DiagramTextKey
-
A platform-neutral key chord. key is the lowercase logical key label,
such as
bortab; hosts normalize the platform primary modifier into command. - DiagramTextKeyContext
- The text a key chord applies to.
- DiagramTextKeyResult
- A handled key chord: a replacement story, a new typing style at a caret, or neither when the chord changes nothing.
- DiagramTextLayoutEngine
- Shapes and lays out a TextStory into a ResolvedTextStory.
- DiagramTextLayoutRevisionSource
- Optional environmental dependency revision for font-backed layout adapters.
- DiagramTextLineGeometry
- Shaped interaction geometry, relative to one resolved visual line. Implementations may retain platform resources; the document never does.
- DiagramTextMarkers
- Markers drawn before paragraphs, such as bullets, numbers and checkboxes.
- DiagramTextPresentation
- A single line of text.
- DiagramTextRegionLayout
- One resolved destination for blocks carrying the matching content slot id.
- DiagramTextSubject
- The text a property formats: one story, the part of it being edited and the text definitions filling its slots.
- DiagramTextTarget
- Exact canonical story ownership, independent of its mounted editor.
- DiagramTextTool
- Creates standalone text through the shared rectangular gesture mechanics.
- DiagramTogglePresentation
- On or off.
- DiagramToolBehavior
- Open behavior interface used equally by standard and host-defined tools.
- DiagramToolContext
- Input adapters implement mechanics; tools compose them without private state.
- DiagramToolDefinition
- A registered tool: its id and label, the behavior that handles pointer input and optional shortcut, group and icon.
- DiagramToolGesture
- Custom gestures preview verbs through one interaction lease: each sample replaces the last and the gesture commits one undo entry.
- DiagramToolPointer
- Pointer coordinates already projected through the canonical camera.
- DiagramToolRegistry
- The registered tools, looked up by identity or shortcut.
- DiagramVerb
- A named, typed edit: the one way every surface changes a diagram.
- DiagramVerbCall
- One call of a verb: its targets, decoded arguments and the part it is bound to. Verb implementations read the controller's current state through it and submit their edit.
- DiagramVerbDerived
- A verb that derives its values, such as aligning a selection. A setter, reversedBy, expresses the result in reverse.
- DiagramVerbInvocation
- One verb call as a value: what a key binding, a toolbar item or a gesture preview performs.
- DiagramVerbPair
-
A verb that is half of a declared pair; counterpart names the other verb,
such as
removeRowforinsertRow. - DiagramVerbSetter
- A verb that sets a value. Calling it again with the previous value reverses it.
- DiagramVerbSymmetry
- How a verb's effect can be expressed in reverse by another verb call.
- EffectContext
- Frame inputs for one playing effect. Path access returns a copy so effects cannot corrupt retained geometry.
- EffectDefinition
- Describes one kind of effect: where it plays, how it paints and how it presents the element itself.
- EffectEditing
- The ranges an inspector offers for editing an effect's numeric properties.
- EffectPresentation
- How an element's own rendering shows while an effect plays: scaled about its center and faded. Its text, ports, markers, labels and widgets follow; selection chrome, hit testing and the document do not.
- EffectRegistry
- One registry serves built-in and custom effects, admission and inspector UI.
- EllipseOutline
- An outline in the shape of the ellipse inscribed in its bounds.
- FixedMetricsTextLayoutEngine
- Deterministic headless bootstrap measurement. Flutter canvases supply a platform paragraph shaper through the same placement engine.
- FlutterDiagramOutput
- Renders diagram snapshots to PNG and SVG with Flutter's painting stack.
- FlutterDiagramTextLayoutEngine
- Flutter font shaping with the shared story/slot placement contract. Install on the diagram's resolver before its first document publication.
-
GraphLayoutAlgorithm<
L extends Layout> -
Performs one Layout type
L: a pure Dart algorithm, worker, isolate or remote layout service. Algorithms calculate positions only; they never mutate a diagram or camera.controller.layout(layout)runs the installed algorithm for the layout's type. - GraphLayoutEdge
- A directed edge between two request nodes.
- GraphLayoutNode
- A node to lay out: its size, its current position and whether it is pinned there.
- GraphLayoutRequest
- Immutable, renderer-independent input to a layout algorithm.
- GraphLayoutResult
- The top-left position of every request node. Applying it remains the controller's job.
- ImageValueField
- An optional image, stored as DiagramImageSource.toValue; null until an image is chosen.
- InkValueField
- A freehand stroke, stored as DiagramInk.toValue. Every shape supplies its own ink; there is no default stroke.
- NumberValueField
- A finite number field, optionally bounded by minimum and maximum and optionally restricted to integers.
- ObjectValueField
- Structured host-owned content. Nested values must be finite, acyclic JSON. Domain schemas are enforced by canonical host admission, not by this field. The standard inspector summarizes this field; hosts provide schema-based forms.
- PathValueField
- An editable vector path in frame-local unit coordinates, stored as DiagramVectorPath.toValue. A path or line shape's outline reads it and its point editor writes it.
- PlainTextDefinition
- Runs and paragraph breaks, with inline font, size and color.
- PolygonOutline
- A closed outline with straight edges between its points, which are in shape-local coordinates. At least three points are required.
- PortDefinition
- A connection port declared by a shape: an id, where it sits (placement) and how it is drawn (style).
- PortPlacement
- A closed placement expression for a port relative to the primary frame or a named layer.
- PortStyle
- How a port marker looks. width runs along the port's side and height along its outward normal, so one style reads the same on every side.
- RectangleOutline
- An outline in the shape of its bounds, with optional circular corners of cornerRadius.
- ResolvedArrowhead
- Resolved terminal-marker geometry shared by paint, hit testing and export.
- ResolvedConnectionPoint
- A resolved magnet shared by pointer snapping and connection-point paint. Virtual points are projections, never hidden durable ports.
- ResolvedConnector
- A connector resolved to its route: points and bodyPoints along the path, arrowheads at its ends, handles, labels and bundle badges.
- ResolvedConnectorBundleBadge
- One count badge at a collapsed bundle attachment.
- ResolvedConnectorLabel
- Revision-owned label geometry. The box stays upright as its path changes.
- ResolvedContentTextRegion
- A content-owned group of lines and its spatial adjacency rules.
- ResolvedDiagramTextTarget
- Story and geometry from the same resolved revision, with edit admission.
- ResolvedElement
- An element resolved to geometry: its id, zIndex, bounds and hit testing. Shapes, text elements and connectors have resolved forms.
- ResolvedFramedElement
- Shared resolved frame geometry, independent of shape surface appearance.
- ResolvedOutline
- Renderer-independent geometry contract. Extensions may provide new outline implementations without changing the engine or document model.
- ResolvedPathGeometry
- Immutable arc-length geometry over the authoritative resolved route. Consecutive duplicate samples are removed without changing its contour.
- ResolvedPathSample
- A point on a resolved route: its position, the unit tangent there and its fraction of the route's length. The normal is the tangent rotated a quarter turn.
- ResolvedPortTarget
- A port found by hit testing, with the shape that owns it.
- ResolvedScene
- An immutable snapshot of a document resolved at one revision.
- ResolvedShape
- A shape resolved to geometry: its outline, text, content, layers, widget slots and ports.
- ResolvedShapeContent
- Immutable extension geometry lowered to the renderer's shared productions.
- ResolvedShapeLayer
- One resolved paint layer of a shape: the layer's definition, the bounds it paints in and the owning shape's values that it reads.
- ResolvedShapePort
- A port of a resolved shape, with its marker outline and the inset connectedOutline filled while a connector binds it.
- ResolvedShapeWidgetSlot
- Pure geometry for mounting a widget; never a durable widget instance.
- ResolvedTextElement
- A standalone text element resolved to geometry, with its laid-out text and layers.
- ResolvedTextFontFamilies
- Immutable font fallback order retained by a native text shaper for output.
- ResolvedTextLine
- One visual line of laid-out text, with its bounds, text, runs and shaping metrics.
- ResolvedTextMarker
- One list marker placed by the same layout pass as its first content line. Bounds are in the story owner's local coordinates, independent of text alignment. Visual geometry and activation are supplied by text contributions.
- ResolvedTextStory
- A text story after layout: its lines, the clipBounds they paint in and the contentHeight they need.
- ShapeAdjustment
- An on-canvas handle bound to the numeric value field, such as an arrow's shaft thickness: dragging it sets the value within the field's bounds. Right/up increase; left/down decrease.
- ShapeAffordance
- An on-canvas control a shape offers beside its single selection, which performs one of its verbs. The definition declares what the control does; an interactive host decides how to draw it and shows it only while the verb is available.
- ShapeAspectLockAffordance
-
Locks or unlocks the aspect ratio through
setAspectLocked. Locking first makes the frame square, so a rectangle becomes a square and an ellipse a circle; resizing then keeps that ratio until it is unlocked. - ShapeBehavior
- What a person may do to a shape on the canvas.
- ShapeBoundsDefinition
- Where one compiled part sits, relative to the shape frame. Bodies are authored as parts; these rules are what they compile to, and what content parts such as tables receive for their region.
- ShapeCollapseDefinition
- A container's compact presentation, such as a collapsed frame. Its body replaces the expanded body and may only reuse existing text slots.
- ShapeColumn
- Children stretch across the column; unspecified heights share remaining space.
- ShapeConnectionDefinition
- Closed connection production for a registered shape.
- ShapeContainer
- A shape that owns child elements, as a group or frame does.
- ShapeContentEditingProvider
- Optional editing semantics contributed by a structured content provider.
- ShapeContentLayerDefinition
- Extension-owned content fills this region and participates in intrinsic sizing.
- ShapeContentLayoutProvider
- A portable provider for a registered structured content region.
- ShapeContentLayoutSession
- Scratch work owned by one shape resolution, shared with its fitting probes.
- ShapeContentPart
- A portable extension leaf lowers into registered content declarations, such as a table.
- ShapeContentResolver
- Runs provider contributions without giving them publication or controller access.
- ShapeDefinition
- One production in the closed shape grammar: a shape's anatomy.
- ShapeDivider
- A straight divider on one edge of its layout slot.
- ShapeDividerLayerDefinition
- A divider attached to one edge of its resolved bounds.
- ShapeImage
- The image the shape stores in its ImageValueField valueKey, fitted to this region, or a placeholder until one is chosen.
- ShapeImageLayerDefinition
- The image a shape stores in its ImageValueField valueKey, fitted to the region, or a placeholder while it has none.
- ShapeLayerDefinition
- One compiled part of a shape's body, in paint order, placed by bounds.
- ShapeLibraries
- Opt-in libraries built entirely from public shape and composition declarations.
- ShapeLibrary
- A reusable collection. Selecting libraries never silently replaces a type.
- ShapeOptionalSlotAffordance
-
Adds or removes the optional text of slotId, shown beside the text of
anchorSlotId, through the
addSlotandremoveSlotverbs, as one undoable edit. The text is present while it is nonblank, or while the boolean value enabledValueKey is true when the shape stores one. - ShapeOutline
- The geometry of a shape, or of a surface inside one: a rectangle, an ellipse or a path computed from the frame size and the shape's values.
- ShapeOutside
- Places its child in a band outside the region, beside edge, such as a frame's title above it. The band takes no space inside the shape.
- ShapePadding
- Insets its child. Absolute padding shrinks with a small region instead of inverting it; proportional padding is a fraction of the region.
- ShapePart
- Portable parts compile to ordinary layers; instances own one story and transform.
- ShapeParts
- Reusable composition building blocks shared by domain shape libraries.
- ShapePortLayout
- Framework-owned placement helpers for nodes with a variable number of declarative ports. The returned anchors remain the single geometry input consumed by resolution, painting, hit testing, and connector binding.
- ShapeRegistry
-
The validated grammar of one DiagramExtensionRegistry: the shapes,
text elements, connectors, routes, arrowheads, port shapes and content
its installed extensions contribute. The extension registry is the one
place a grammar is assembled; read it as
DiagramExtensionRegistry(extensions: [...]).shapeRegistry. - ShapeRow
- Children stretch across the row; unspecified widths share remaining space.
- ShapeShadowDefinition
- Paint-only shadow derived from a shape production.
- ShapeSized
- Fixed extent along the containing row/column, or a share of remaining space.
- ShapeStack
- Paints parts back-to-front in the same bounds.
- ShapeSurface
- A painted region with its own outline and fixed style, behind its optional child. Without an outline it paints nothing: a transparent region, such as a spacer or the area of an onInteract control.
- ShapeSurfaceLayerDefinition
- A compiled ShapeSurface.
- ShapeText
-
A text slot. Stable slot IDs are also used by
DiagramController.setText(id, text, slot: ...). - ShapeTextCreation
- Text sizing defaults for authored frames and click-created elements. Explicit creation intents may override these defaults.
- ShapeTextLayerDefinition
- A named text slot. Several paragraphs may flow through the same slot.
- ShapeValueEdit
-
A continuous edit of a shape's values, such as a slider drag, on one
interaction lease: each preview performs
setValuesfrom the values at the start, commit records one undo entry and cancel restores them. - ShapeValueToggleAffordance
- Switches the boolean value valueKey through the setter verb, passing the opposite value as argument, as one undoable edit.
- ShapeVisibility
- When an optional part of a composition shows. A hidden part takes no space in its row or column and paints nothing.
- ShapeWidget
- A region a host may fill with a live widget registered for widgetKey. The portable fallback paints wherever no widget is mounted, such as in exports, and shares the shape's text.
- ShapeWidgetContext
- One immutable resolved slot snapshot and commands bounded to its owner.
- ShapeWidgetLayerDefinition
- A host-rendered widget slot with a mandatory portable visual fallback.
- ShapeWidgetRegistry
- Immutable Flutter builders, separate from the pure shape grammar and document.
- TextParagraphAttributes
- Paragraph structure a text definition adds beyond plain text, such as the lists and headings of rich text.
- TextRunAttributes
- Inline presentation a text definition adds beyond plain runs, such as the marks of rich text.
- TextStoryContent
- Immutable nested authored content supplied by a model extension.
- TextValueField
- A string field, optionally limited to allowedValues.
- ValueField
- A declared field in a shape's durable custom content. Scalar fields support automatic controls; structured objects use host forms.
- VectorPathOutline
- One shared adaptive contour drives drawing, picking and SVG output. Nodes and tangents remain available for editing in the same local space.
Enums
- CollapsedConnectionPresentation
- How a collapsed frame's connectors are drawn. Expanded geometry remains in the document.
- DiagramBorderStyle
- Line pattern of a DiagramBorder. none draws no line.
- DiagramChoiceStyle
- How a choice is presented.
- DiagramConnectorControlMode
- What a route's editing handles move.
- DiagramContentTextAction
- Portable editing intents for structured content.
- DiagramKeyModifier
- A modifier held with a shortcut key. command is Meta on Apple platforms and Control elsewhere.
- DiagramKeyScope
- The input owner in which a key binding is eligible. Text never falls through to canvas or selection bindings.
- DiagramNumberStyle
- How a number is presented.
- DiagramPropertyGap
- The gaps an inspector places between property rows and sections.
- DiagramPropertyLabelPlacement
- Where a field's label sits relative to its control.
- DiagramPropertyLayout
- Where an inspector places a property editor's control.
- Physical direction through a composed content region.
- DiagramTextVerticalAlignment
- How a text story's lines are placed vertically within their region: against the top, the center or the bottom.
- DiagramToggleStyle
- How a toggle is presented.
- DiagramToolCursor
- Pointer cursor a tool asks the host to show.
- DiagramVerbTarget
- What a verb acts on.
- EffectProperty
- Effect values an inspector may offer for editing.
- PortPlacementKind
- A stable, declarative connection target positioned in normalized shape coordinates. Its geometry and style are resolved with the owning shape.
- ShapeAdjustmentHandle
- Distinguishable control symbols independent of a shape's implementation.
- ShapeConnectionKind
- How connectors may attach to a shape.
- ShapeEdge
- One edge of a region.
- ShapeLayerCursor
- The pointer over a compiled part: plain, an interaction or editable text.
- ShapeResizeHandle
- Closed resize sites of a selected shape.
- ShapeTextSizing
- Closed text-to-geometry policies supported by the canonical resolver.
Extensions
- DiagramCameraGeometry on DiagramCameraState
- Viewport mathematics for a camera state.
- DiagramResolvedConnectionPoints on ResolvedFramedElement
- The points where a connector can attach to a resolved element.
- DiagramTextVerbCall on DiagramVerbCall
- What text extensions build their verbs on.
Constants
- diagramDefaultBlockSpacing → const double
- Gap between successive authored blocks; omitted after the final block.
- diagramDefaultConnectorLabelFontSize → const double
- diagramDefaultFontSize → const double
- diagramDefaultLineHeight → const double
- diagramDefaultTextHeight → const double
- Shared line-height multiplier for editable text in every shape region.
- diagramStrokeHitTolerance → const double
- Stroke pick radius used by ResolvedOutline.contains for open paths.
- diagramTagAffordance → const ShapeOptionalSlotAffordance
- The optional tag beside a card's title, added and removed on the canvas. Shapes sharing the card header, such as entities, offer it too.
Properties
-
diagramCardVerbs
→ List<
DiagramVerb> -
A card's own verbs: thin bindings of its text parts' verbs. They apply
to any shape declaring them with the same parts.
final
- diagramSetTextVerb → DiagramVerb
-
The verb every text part offers, bound to its slot: its whole text as
plain paragraphs, one per line.
final
Functions
-
cloneTextParagraph(
TextParagraph block, String nextId(String kind), {String? slotId}) → TextParagraph - Copies authored paragraph attributes while assigning a new durable identity.
-
diagramRouteControlToWorld(
DiagramPoint control, DiagramPoint start, DiagramPoint end) → DiagramPoint - Resolves an endpoint-relative route control into world coordinates.
-
diagramWorldToRouteControl(
DiagramPoint point, DiagramPoint start, DiagramPoint end) → DiagramPoint - Encodes a world point as endpoint-relative route control intent.
-
resolveShapePath(
DiagramRect frame, DiagramVectorPath localPath, {double cornerRadius = 0}) → ResolvedOutline -
Resolves
localPath, in shape-local units from theframeorigin, atframe: a closed, straight-edged path is a PolygonOutline, so connectors meet its true edges; any other path is a VectorPathOutline that keeps its nodes.
Typedefs
- DiagramCanvasContainerBuilder = Widget Function(BuildContext context, DiagramController controller, Widget canvas)
- Wraps the existing canvas without creating another controller or canvas.
-
DiagramKeyArguments
= Map<
String, Object?> Function(DiagramController controller, String? elementId) -
Computes a bound verb's arguments when its chord is pressed, from the
current state of
controllerand the targetedelementId. -
DiagramOutput
= DiagramOutputAdapter<
DiagramSnapshot> - A DiagramOutputAdapter that exports a DiagramSnapshot as SVG or PNG.
-
DiagramPasteHandler
= Future<
bool> Function(DiagramController controller, String? text) - Handles text pasted on a canvas that holds no copied diagram content, such as Mermaid source. Browser gestures supply their clipboard text; native keyboard requests pass null so the handler can read the clipboard. Return true when the paste was handled.
-
DiagramPropertyArgs<
S, T> = Map< String, Object?> Function(S subject, T value) -
The arguments of a property's verb for setting
valueonsubject. - DiagramTextSelectionFormatter = bool Function(String label, TextRun format(TextRun run))
- Formats the text selection of a mounted text editor. Returns false when no editor handles the change, so it applies to the canonical story instead.
- DiagramToolPreview = DiagramGesturePreview Function(DiagramEditorState start, DiagramToolPointer pointer)
-
Computes what one sample of a custom gesture previews, from the gesture's
baseline state
startand the current pointer. - EffectPresent = EffectPresentation Function(EffectContext context)
- Changes how an element's own rendering shows while an effect plays.
- PlacedEffect = ({Effect effect, String elementId, Duration start})
-
One effect playing on the element with
elementId, played when the canvas frame clock readstart. -
ShapePathBuilder
= DiagramVectorPath Function(DiagramSize size, Map<
String, Object?> values) -
Builds a contour in shape-local units, from (0, 0) to the frame
size, from the shape'svalues. Features such as caps and insets can keep their size while the frame grows. - ShapeWidgetBuilder = Widget Function(BuildContext context, ShapeWidgetContext shape)
- Builds a live control projection for a registered shape widget slot.