pub enum Modifier {
Show 19 variants
Empty,
Padding(f32),
FillMaxWidth,
FillMaxHeight,
Width(f32),
Height(f32),
Size {
width: f32,
height: f32,
},
Background(Paint),
Clickable {
handler_id: u64,
},
PaddingRole(SpaceRole),
PaddingEach {
start: f32,
top: f32,
end: f32,
bottom: f32,
},
Weight(f32),
Shape {
top_start: f32,
top_end: f32,
bottom_end: f32,
bottom_start: f32,
},
ShapeRole(ShapeRole),
Border {
width: f32,
paint: Paint,
},
Elevation(f32),
ObserveSize {
token: u32,
},
Motion(MotionRole),
Material(MaterialRole),
}Variants§
Empty
Padding(f32)
FillMaxWidth
FillMaxHeight
Width(f32)
Height(f32)
Size
Background(Paint)
A Paint, not a raw ARGB. Colour has exactly one wire representation.
Clickable
PaddingRole(SpaceRole)
PaddingEach
Weight(f32)
Shape
ShapeRole(ShapeRole)
Border
Elevation(f32)
One dp value. How the shadow is drawn is the design system’s rule: tonal lift plus a shadow, a wide soft shadow, or layered shadow plus a hairline stroke.
ObserveSize
Asks the Renderer to report this node’s measured size, the way it reports the window’s.
The token is the application’s own name for the node. A node id belongs to the Renderer and is never something the Host chose, so a screen that wants to know how wide one of its own containers ended up needs a name it gave itself. The Renderer does not read it.
Motion(MotionRole)
Which curve and length this node’s changes run along.
The node says how important the change is, not how long it takes. Appearing, disappearing, a selection moving and a size changing all read this.
Material(MaterialRole)
What this node’s surface is made of.
A role, so that a system which blurs blurs and a system which does not lifts its surface instead. Nothing here claims a particular effect was achieved.