OudsListItem constructor
- Key? key,
- required String label,
- 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 a plain text label.
Implementation
const OudsListItem({
super.key,
required String label,
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,
// Field is nullable for the .labelContent constructor; the parameter stays
// non-nullable so that `label: null` is a compile-time error.
// ignore: prefer_initializing_formals
}) : label = label,
labelContent = null;