pub fn Canvas(_: CanvasProps) -> ElementExpand description
Pixels the widget vocabulary cannot produce: charts, sparklines, signature pads, rings.
The list is a value, not a callback, because drawing code cannot cross the boundary into an ahead-of-time compiled Renderer. Two equal lists are one attribute comparison, so a frame that redraws the same chart sends nothing. Size comes from the Modifier chain, and coordinates are dp from the widget’s top-left corner.
Colour goes through Paint, so Paint::Role(ColorRole::Primary) draws in whatever the
active design system calls primary.
§Props
For details, see the props struct definition.
weight:Option<f32>width:Option<f32>height:Option<f32>padding:Option<f32>padding_role:Option<SpaceRole>background:Option<Paint>shape_role:Option<ShapeRole>corner_radius:Option<f32>border_width:Option<f32>border_color:Option<Paint>elevation:Option<f32>fill_max_width:boolfill_max_height:boolcommands:DrawList