OudsSmallCardItem class
OUDS Card Item Design Guidelines
Reference design version : 0.3.0
A compact card-formatted variant of OudsCardItem.
Compared to OudsCardItem, this variant omits overline and extraLabel
and reuses the restricted leading / trailing model from OudsSmallListItem,
while applying the card decoration defaults.
It always uses the grid margin for its horizontal padding, like an edge-to-edge OudsSmallListItem.
- leading accepts OudsSmallListItemLeadingIcon or OudsSmallListItemLeadingImage.
- trailing accepts OudsSmallListItemTrailingIcon, OudsSmallListItemTrailingImage, OudsSmallListItemTrailingText, OudsSmallListItemTrailingBadge or OudsSmallListItemTrailingTag.
Usage Example
OudsSmallCardItem(
label: 'Messagerie',
description: '3 notifications',
leading: OudsSmallListItemLeadingIcon(Info()),
)
OudsSmallCardItem(
label: 'Paiement',
trailing: OudsSmallListItemTrailingText('99€'),
onTap: () {},
)
// Small card with an image loaded from the network and a custom
// placeholder shown while loading (and if loading fails)
OudsSmallCardItem(
label: 'Product',
leading: OudsSmallListItemLeadingImage.provider(
provider: NetworkImage('https://example.com/photo.jpg'),
semanticsLabel: 'Product photo',
placeholder: Image.asset('assets/placeholder.jpg'),
),
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- OudsSmallCardItem
Constructors
- OudsSmallCardItem({Key? key, required String label, OudsListItemContentAlignment contentAlignment = OudsCardItemDefaults.contentAlignment, OudsListItemDecoration decoration = OudsCardItemDefaults.decoration, String? description, OudsSmallListItemLeading? leading, OudsSmallListItemTrailing? trailing, String? helperText, bool boldLabel = false, bool enable = true, VoidCallback? onTap, OudsListItemIndicator indicator = OudsCardItemDefaults.indicator, OudsSkeleton? skeleton})
-
Creates a compact OUDS card item.
const
Properties
- boldLabel → bool
-
Whether label is rendered in bold. Defaults to
false.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.
final
- enable → bool
-
Whether the item is interactive. Defaults to
true.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
- leading → OudsSmallListItemLeading?
-
Optional leading content.
final
- onTap → VoidCallback?
-
Callback invoked when the card is tapped.
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 → OudsSmallListItemTrailing?
-
Optional trailing content.
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