OudsCardItem class
OUDS Card Item Design Guidelines
OUDS Navigation Card Item Design Guidelines
Reference design version : 0.3.0
A card-formatted variant of OudsListItem.
OudsCardItem keeps the rich content model of list item — overline,
label, extra label, description, leading and trailing slots — while applying
the card decoration defaults. It is ideal for read-only summaries,
grouped content and navigable cards with stronger visual emphasis.
The component keeps the default list-item density and always uses the grid margin for its horizontal padding, like an edge-to-edge OudsListItem.
Usage Example
OudsCardItem(
label: 'Plan 200 Go',
overline: 'Mobile',
extraLabel: 'Sans engagement',
description: '5G en France et en Europe',
leading: OudsListItemLeadingIcon(Positive()),
)
OudsCardItem(
label: 'Voir le détail',
description: 'Ouvre une nouvelle page',
onTap: () {},
)
OudsCardItem.labelContent(
labelContent: (context, state) => Text('Custom label content'),
description: 'Ouvre une nouvelle page',
)
// Card with an image loaded from the network and a custom
// placeholder shown while loading (and if loading fails)
OudsCardItem(
label: 'Product',
leading: OudsListItemLeadingImage.provider(
provider: NetworkImage('https://example.com/photo.jpg'),
semanticsLabel: 'Product photo',
placeholder: Image.asset('assets/placeholder.jpg'),
),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- OudsCardItem
Constructors
- OudsCardItem({Key? key, required String label, OudsListItemContentAlignment contentAlignment = OudsCardItemDefaults.contentAlignment, OudsListItemDecoration decoration = OudsCardItemDefaults.decoration, String? overline, String? extraLabel, String? description, Widget belowTextContent(BuildContext context, OudsListItemControlState state)?, OudsListItemLeading? leading, OudsListItemTrailing? trailing, Widget bottomContent(BuildContext context, OudsListItemControlState state)?, String? helperText, bool boldLabel = false, bool enable = true, VoidCallback? onTap, OudsListItemIndicator indicator = OudsCardItemDefaults.indicator, OudsSkeleton? skeleton})
-
Creates an OUDS card item.
const
- OudsCardItem.labelContent({Key? key, required Widget labelContent(BuildContext context, OudsListItemControlState state), OudsListItemContentAlignment contentAlignment = OudsCardItemDefaults.contentAlignment, OudsListItemDecoration decoration = OudsCardItemDefaults.decoration, String? overline, String? extraLabel, String? description, Widget belowTextContent(BuildContext context, OudsListItemControlState state)?, OudsListItemLeading? leading, OudsListItemTrailing? trailing, Widget bottomContent(BuildContext context, OudsListItemControlState state)?, String? helperText, bool boldLabel = false, bool enable = true, VoidCallback? onTap, OudsListItemIndicator indicator = OudsCardItemDefaults.indicator, OudsSkeleton? skeleton})
-
Creates an OUDS card item with fully custom
labelContentinstead of a plain text label.const
Properties
- belowTextContent → Widget Function(BuildContext context, OudsListItemControlState state)?
-
Optional fully custom content displayed right after description, inside
the center text column.
final
- boldLabel → bool
-
Whether label is rendered in bold. Defaults to
false.final - bottomContent → Widget Function(BuildContext context, OudsListItemControlState state)?
-
Optional fully custom content displayed below the main row, full-width,
but still inside the item's background/border area.
final
- contentAlignment → OudsListItemContentAlignment
-
Vertical alignment of all slots.
final
- decoration → OudsListItemDecoration
-
Visual decoration of the card. Defaults to
OudsCardItemDefaults.decoration (persistent background with a bottom
divider). Pass
OudsListItemDecorationBackground(divider: false)to keep the background without the divider.final - description → String?
-
Optional secondary text displayed below label / extraLabel.
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.
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
- labelContent → Widget Function(BuildContext context, OudsListItemControlState state)?
-
Optional fully custom content replacing the plain text label.
final
- leading → OudsListItemLeading?
-
Optional content at the start of the row.
final
- onTap → VoidCallback?
-
Callback invoked when the card 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
- skeleton → OudsSkeleton?
-
An optional skeleton that improves the perceived loading time by providing a visual cue of where the card item will appear once fully loaded.
final
- trailing → OudsListItemTrailing?
-
Optional content at the end of the row.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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