OudsListItem.labelContent constructor
- Key? key,
- required Widget labelContent(
- BuildContext context,
- OudsListItemControlState state
- OudsListItemSize size = OudsListItemSize.defaultSize,
- OudsListItemContentAlignment contentAlignment = OudsListItemDefaults.contentAlignment,
- String? overline,
- String? extraLabel,
- String? description,
- Widget belowTextContent(
- BuildContext context,
- OudsListItemControlState state
- OudsListItemLeading? leading,
- OudsListItemTrailing? trailing,
- Widget bottomContent(
- BuildContext context,
- OudsListItemControlState state
- 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,
- OudsSkeleton? skeleton,
Creates an OUDS list item with fully custom labelContent instead of a
plain text label.
Implementation
const OudsListItem.labelContent({
super.key,
required Widget Function(
BuildContext context,
OudsListItemControlState state,
)
labelContent,
this.size = OudsListItemSize.defaultSize,
this.contentAlignment = OudsListItemDefaults.contentAlignment,
this.overline,
this.extraLabel,
this.description,
this.belowTextContent,
this.leading,
this.trailing,
this.bottomContent,
this.divider = true,
this.background = false,
this.decoration,
this.helperText,
this.boldLabel = false,
this.enable = true,
this.onTap,
this.indicator = OudsListItemDefaults.indicator,
this.card = false,
this.edgeToEdge = true,
this.skeleton,
}) : label = null,
// Field is nullable for the default constructor; the parameter stays
// non-nullable so that `labelContent: null` is a compile-time error.
// ignore: prefer_initializing_formals
labelContent = labelContent;