CPListSection constructor

CPListSection({
  1. String? header,
  2. bool? sectionIndexEnabled,
  3. required List<CPListTemplateItem> items,
  4. String? id,
})

Creates CPListSection that contains zero or more list items. You can configure a section to display a header, which CarPlay displays on the trailing edge of the screen.

Implementation

CPListSection({
  this.header,
  this.sectionIndexEnabled,
  required List<CPListTemplateItem> items,
  String? id,
})  : items = List<CPListTemplateItem>.from(items),
      _elementId = id ?? const Uuid().v4();