processFAAListSectionSelectedChannel method

void processFAAListSectionSelectedChannel(
  1. String elementId,
  2. int selectedIndex
)

Implementation

void processFAAListSectionSelectedChannel(
  String elementId,
  int selectedIndex,
) {
  final AAListSection? listSection = _androidAutoHelper.findAAListSection(
    templates: templateHistory,
    elementId: elementId,
  );
  final selectedItem = listSection?.items.elementAtOrNull(selectedIndex);

  if (listSection != null && selectedItem != null) {
    listSection.selectedIndex = selectedIndex;
    listSection.onSelected?.call(selectedIndex, selectedItem);
  }
}