Skip to main content

Media and custom surfaces

This family covers the parts of the widget surface that connect the shared layout and state model to richer visual or host-backed content.

Some of these widgets are still ordinary display widgets with a media flavor, such as images. Others, such as video, web views, and terminal surfaces, represent deeper runtime or host integration boundaries. The custom drawing helpers sit here because they are the most direct way to go beyond the ordinary built-in widget surface without abandoning the framework model.

Media and embed widgets

WidgetDedicated pageWhen to choose it
ImageImageStatic image content
VideoVideoVideo playback surface tied to runtime registration
WebViewWebViewEmbedded browser content surface
TerminalViewTerminalViewInteractive terminal surface inside the app
TerminalLaunchConfigTerminalLaunchConfigSupporting type for terminal startup configuration
TerminalSessionTerminalSessionSupporting handle for a live terminal session

Custom drawing and escape hatches

Widget or helperDedicated pageWhen to choose it
canvas(...)canvasYou need lightweight custom drawing without leaving the widget model
CanvasLowererCanvasLowererYou are working at the lower-level helper behind canvas(...)
CustomNodeCustomNodeA widget needs custom lowering or a custom render object
NodeNodeYou need the erased authored node type directly
BuilderBuilderYou need a lower-level authoring builder helper

How to choose within this family

Use Image when the content is still ordinary image display.

Move to Video, WebView, or TerminalView when the surface needs runtime registration or host-backed behavior.

Reach for canvas(...) when the built-in surface is close but you need a focused custom drawing escape hatch.

Reach for CustomNode only when you truly need lower-level control over lowering or rendering. It is powerful, but most screens should stay in ordinary widget composition as long as they can.

Practical cross-reference

For the runtime contracts behind animation, portals, and media registration, see Animations, portals, and media. For a guided explanation of these ideas in app terms, read Media, animation, portals, and 3D. For the full widget map, return to the Widget catalog.