CPListItem constructor

CPListItem({
  1. String? text,
  2. String? detailText,
  3. FutureOr<void> onPress(
    1. dynamic complete(),
    2. CPListItem self
    )?,
  4. String? image,
  5. AutoImageTint? imageTint,
  6. String? accessoryImage,
  7. String? trailingImage,
  8. AutoImageTint? trailingImageTint,
  9. double? playbackProgress,
  10. bool? isPlaying,
  11. CPListItemPlayingIndicatorLocation? playingIndicatorLocation,
  12. CPListItemAccessoryType? accessoryType,
  13. String? id,
})

Creates CPListItem that manages the content of a single row in a CPListTemplate. CarPlay manages the layout of a list item and may adjust its layout to allow for the display of auxiliary content, such as, an accessory or a Now Playing indicator. A list item can display primary text, secondary text, now playing indicators as playback progress, an accessory image and a trailing image.

Implementation

CPListItem({
  super.text,
  this.detailText,
  this.onPress,
  this.image,
  this.imageTint,
  this.accessoryImage,
  this.trailingImage,
  this.trailingImageTint,
  this.playbackProgress,
  this.isPlaying,
  this.playingIndicatorLocation,
  this.accessoryType,
  String? id,
}) : _elementId = id ?? const Uuid().v4();