DVStudioCanvas class

The editing canvas.

Renders the document as the real widgets it describes — the same DVPageDocumentRenderer output the running app shows — with selection and drop targets layered over it. What is edited is what ships.

The page sits on an artboard the width of the device being designed for, on a workspace: tapping the workspace clears the selection, the way it does in every design tool, because otherwise there is no way to see a page without an outline on it.

Inheritance

Constructors

DVStudioCanvas({Key? key, required DVStudioEditorController controller, double? viewportWidth, double zoom = 1.0, double? viewportHeight, Widget frame(Widget content)?, DVStudioAppLook? look, Brightness? appearance})
const

Properties

appearance → Brightness?
The appearance somebody chose to see it in; null for the one the application shows on this device.
final
controller → DVStudioEditorController
final
frame → Widget Function(Widget content)?
What the page is drawn inside: the layouts and shell its route draws it in, from the application's own view of the route. With one, the artboard is the live route with the page's body editable in it.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
look → DVStudioAppLook?
The application's look, which the page is drawn in.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
viewportHeight → double?
The window's height, with frame: the page is laid out in a window this tall, inside its layouts, and scrolls inside it as it does on the site; null for as tall as the canvas has room for. Without a frame the artboard is as tall as the page.
final
viewportWidth → double?
The width the page is laid out at — a device's — or null to fill the space the canvas has.
final
zoom → double
How far the artboard is magnified, from its top centre.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<DVStudioCanvas>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited