MinimalStyle typedef
MinimalStyle = DesignStyle
How one part looks: ui_core's DesignStyle, under Minimal's name. Every slot resolves for the part's states (WidgetState.disabled, WidgetState.hovered, WidgetState.focused, WidgetState.pressed, WidgetState.selected, WidgetState.error).
A part reads each slot from its own style: first, then from its
component theme on MinimalThemeData, then from the theme-wide knobs
(shapes, density, typeface), then from the look's own default. A
slot that is null, or resolves to null for the states at hand, falls
through to the next.
| slot | what it sets |
|---|---|
fill |
the face or plate |
foreground |
the words and icons on it |
edge |
the rim's colour, at the theme's t.rim |
overlay |
the wash over the face while hovered or pressed |
side |
the whole rim, colour and width; it wins over edge |
shape |
the outline: any OutlinedBorder |
padding |
the room between the rim and what stands inside |
minimumSize |
the least the face stands; its tap target stays the floor round it |
textStyle |
the words' style, merged over the look's (its colour comes from foreground) |
iconSize |
an icon's size |
Each part's doc says which slots it reads.
MinimalButton(
'Save',
onPressed: save,
style: MinimalStyle(
shape: const WidgetStatePropertyAll(StadiumBorder()),
padding: const WidgetStatePropertyAll(
EdgeInsets.symmetric(horizontal: 20),
),
),
)
Implementation
typedef MinimalStyle = DesignStyle;