SceneCanvasHost class
The scene editor's canvas, hosted by the app whose theme and widgets the scenes use.
The generated sceneCanvasHost entry beside a group's scenes.dart
mounts this through SceneCanvasHost.of, under the group's own wrapper,
and the editor composites it: it sends the scene as data over a
VM-service extension, this draws it with SceneView, and answers with
what the layout measured — which is where the editor's selection
rectangles and drag targets come from.
The editor also sends its view — how the canvas is scaled and panned — and this draws the artboard through it. The window this renders into is the size of the editor's canvas pane, so a zoomed-in artboard is rasterised at the zoom, crisp at any magnification, and the picture never costs more than the pane's pixels.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SceneCanvasHost
Constructors
-
SceneCanvasHost({Key? key, List<
ExternalWidget> externals = const [], List<Token< tokens = const [], Map<Object?> >String, SceneKindRenderer> renderers = const {}, Color ground = const Color(0x00000000)}) -
const
Properties
-
externals
→ List<
ExternalWidget> -
The widgets a scene may place, as the app declares them.
final
- ground → Color
-
What shows around the artboard. Transparent by default, so the editor's
own ground shows through.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
renderers
→ Map<
String, SceneKindRenderer> -
Renderers for registered kinds, handed to every view this host mounts.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
tokens
→ List<
Token< Object?> > -
The tokens the app declares — for the opaque ones, whose objects only
this process holds; see
bindExternals.final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< SceneCanvasHost> -
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
Static Methods
-
of(
SceneGroup group) → Widget - The canvas for one group, under the group's wrapper — what the generated entry mounts.