CPListItem class

A selectable list item object that appears in a list template.

Constructors

CPListItem({required String text, String? detailText, dynamic onPress(dynamic complete(), CPListItem self)?, String? image, double? playbackProgress, bool? isPlaying, CPListItemPlayingIndicatorLocations? playingIndicatorLocation, CPListItemAccessoryTypes? accessoryType})
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.

Properties

accessoryType CPListItemAccessoryTypes?
An accessory that the list item displays in its trailing region.
getter/setter pair
detailText String?
Secondary text displayed below the primary text in the list item cell.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
image String?
Displays an image on the leading edge of the list item cell. Image asset path in pubspec.yaml file. For example: images/flutter_logo.png
getter/setter pair
isPlaying bool?
Determines whether the list item displays its Now Playing indicator.
getter/setter pair
onPress → dynamic Function(dynamic complete(), CPListItem self)?
An optional callback function that CarPlay invokes when the user selects the list item.
final
playbackProgress double?
Playback progress status for the content that the list item represents.
getter/setter pair
playingIndicatorLocation CPListItemPlayingIndicatorLocations?
The location where the list item displays its Now Playing indicator.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
Text displayed in the list item cell.
getter/setter pair
uniqueId String
no setter
updateImage String
Updating the image which will be displayed on the leading edge of the list item cell. Image asset path in pubspec.yaml file. For example: images/flutter_logo.png
no getter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setAccessoryType(CPListItemAccessoryTypes accessoryType) → void
Setter for accessoryType
setDetailText(String detailText) → void
Updating the list item's secondary text.
setIsPlaying(bool isPlaying) → void
Setter for isPlaying
setPlaybackProgress(double playbackProgress) → void
Setter for playbackProgress When the given value is not between 0.0 and 1.0, throws RangeError
setPlayingIndicatorLocation(CPListItemPlayingIndicatorLocations playingIndicatorLocation) → void
Setter for playingIndicatorLocation
setText(String text) → void
Updating the list item's primary text.
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
updateTexts({String? text, String? detailText}) → void
Updating the list item's both the primary and detail text at the same time.

Operators

operator ==(Object other) bool
The equality operator.
inherited