OudsCardItem constructor

const OudsCardItem({
  1. Key? key,
  2. required String label,
  3. OudsListItemContentAlignment contentAlignment = OudsCardItemDefaults.contentAlignment,
  4. OudsListItemDecoration decoration = OudsCardItemDefaults.decoration,
  5. String? overline,
  6. String? extraLabel,
  7. String? description,
  8. Widget belowTextContent(
    1. BuildContext context,
    2. OudsListItemControlState state
    )?,
  9. OudsListItemLeading? leading,
  10. OudsListItemTrailing? trailing,
  11. Widget bottomContent(
    1. BuildContext context,
    2. OudsListItemControlState state
    )?,
  12. String? helperText,
  13. bool boldLabel = false,
  14. bool enable = true,
  15. VoidCallback? onTap,
  16. OudsListItemIndicator indicator = OudsCardItemDefaults.indicator,
  17. OudsSkeleton? skeleton,
})

Creates an OUDS card item.

Implementation

const OudsCardItem({
  super.key,
  required String label,
  this.contentAlignment = OudsCardItemDefaults.contentAlignment,
  this.decoration = OudsCardItemDefaults.decoration,
  this.overline,
  this.extraLabel,
  this.description,
  this.belowTextContent,
  this.leading,
  this.trailing,
  this.bottomContent,
  this.helperText,
  this.boldLabel = false,
  this.enable = true,
  this.onTap,
  this.indicator = OudsCardItemDefaults.indicator,
  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;