OudsListItem class
OUDS List Item Design Guidelines
Reference design version : 1.0.0
List item is a UI element that displays a row of information within a list. It mirrors Flutter's ListTile spirit — leading / label / trailing — but uses OUDS design tokens, interaction states and an optional navigation indicator.
A list item can be static (read-only) or interactive (navigation). The item adapts its visual appearance according to hover, pressed and disabled states.
Variants
- Static — no onTap, displays read-only information. No interaction states.
- Navigation — provide onTap to make the item interactive. The entire item
acts as a single link target and supports the following interaction states:
- Enabled — default state; the item is available for navigation.
- Hover — visual feedback when a pointer is over the item. Does not move content, change dimensions, or reveal hidden information.
- Focus — keyboard focus indicator drawn around the complete navigation
target (background + border ring via
actionSupportFocus/actionFocus). - Pressed — temporary state while the item is being activated, applied to the entire navigation target.
Parameters
- label: The mandatory main text displayed in the center column.
- size: Size variant (OudsListItemSize.defaultSize or OudsListItemSize.smallSize).
- contentAlignment: Vertical alignment of all slots within the row (OudsListItemContentAlignment).
- overline: Optional text displayed above label in a smaller, muted style.
- extraLabel: Optional strong label displayed between label and description.
- description: Optional secondary text displayed below label / extraLabel.
- leading: Optional content at the start of the row (icon, image, avatar, flag …).
- trailing: Optional content at the end of the row (icon, image, text, badge, tag …).
- divider: Whether a horizontal divider is drawn below the item. Defaults to
true. - background: Whether the item has a persistent background color. Defaults to
false. Set totruewhen the item should keep a filled surface even when idle. - decoration: Optional explicit decoration override. When provided, it takes precedence over the legacy background / divider mapping.
- helperText: Optional helper text displayed below the row (and below the divider).
- boldLabel: Whether label is rendered in bold. Defaults to
false. - enable: Whether the item is interactive. When
false, all content is rendered in its disabled appearance and onTap is ignored. Defaults totrue. - onTap: Callback invoked when the item is tapped. When non-null the item becomes a navigation item — it gains an indicator and forwards taps.
- indicator: Navigation indicator shown when onTap is provided. Defaults to OudsListItemDefaults.indicator (chevron pointing right).
- card: Whether the item should use the card decoration and rounded shape.
Defaults to
false.
Usage Example
// Static list item with a leading icon
OudsListItem(
label: 'Title',
description: 'Secondary text',
leading: OudsListItemLeadingIcon(Neutral(icon: 'assets/icons/star.svg')),
background: true,
);
// Navigation list item (chevron displayed automatically)
OudsListItem(
label: 'Navigate',
onTap: () => Navigator.of(context).push(…),
);
// List item with overline, extra label and trailing text
OudsListItem(
label: 'Main label',
overline: 'Category',
extraLabel: 'Strong info',
description: 'Additional detail',
trailing: OudsListItemTrailingText(
OudsListItemTrailingLabel('99€'),
),
);
// Disabled list item
OudsListItem(
label: 'Unavailable',
enable: false,
);
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- OudsListItem
Constructors
- OudsListItem({Key? key, required String label, OudsListItemSize size = OudsListItemSize.defaultSize, OudsListItemContentAlignment contentAlignment = OudsListItemDefaults.contentAlignment, String? overline, String? extraLabel, String? description, OudsListItemLeading? leading, OudsListItemTrailing? trailing, bool divider = true, bool background = false, OudsListItemDecoration? decoration, String? helperText, bool boldLabel = false, bool enable = true, VoidCallback? onTap, OudsListItemIndicator indicator = OudsListItemDefaults.indicator, bool card = false, bool edgeToEdge = true})
-
Creates an OUDS list item.
const
Properties
- background → bool
-
Whether the item has a persistent background color. Defaults to
false.final - boldLabel → bool
-
Whether label is rendered in bold. Defaults to
false.final - card → bool
-
Whether the item should use the card decoration and rounded shape.
final
- contentAlignment → OudsListItemContentAlignment
-
Vertical alignment of all slots. Defaults to OudsListItemContentAlignment.center.
final
- decoration → OudsListItemDecoration?
-
Optional explicit decoration override.
final
- description → String?
-
Optional secondary text displayed below label / extraLabel.
final
- divider → bool
-
Whether a horizontal divider is drawn below the item. Defaults to
true.final - edgeToEdge → bool
-
Controls the horizontal layout of the item.
final
- enable → bool
-
Whether the item is interactive. Defaults to
true.final - extraLabel → String?
-
Optional strong accompanying label displayed between label and description.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- helperText → String?
-
Optional helper text displayed below the row (and below the divider).
final
- indicator → OudsListItemIndicator
-
Navigation indicator shown when onTap is provided.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String
-
The mandatory main label displayed in the center column.
final
- leading → OudsListItemLeading?
-
Optional content at the start of the row (icon, image, avatar, flag …).
final
- onTap → VoidCallback?
-
Callback invoked when the item is tapped.
final
- overline → String?
-
Optional text displayed above label in a smaller, muted style.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → OudsListItemSize
-
Size variant. Defaults to OudsListItemSize.defaultSize.
final
- trailing → OudsListItemTrailing?
-
Optional content at the end of the row (icon, image, text, badge, tag …).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< OudsListItem> -
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