-2

I’m building a music app in Flutter, and I’m using the flutter_carplay plugin to integrate iOS CarPlay functionality. On the CarPlay interface, there’s an "A-Z" sorting option that’s displayed on the home page screen, which is intended for alphabetical selection of collections or playlists.

However, this A-Z sorting option is currently non-functional:

There’s no callback available in the plugin for handling this option. I’d like to either make the sorting functional or hide the option entirely if it can’t be used. Here’s what I’ve tried so far:

Checked the flutter_carplay documentation, but didn’t find any built-in support for alphabetical sorting callbacks. Looked into hiding this option but couldn’t find any configuration for it in the Flutter API. Question:

Does anyone know how to add a callback to the A-Z sorting option in CarPlay with flutter_carplay? If adding a callback isn’t possible, is there a way to hide this option on the CarPlay screen? Any guidance on where to modify the plugin code to add this functionality or hide the option would be greatly appreciated! Thanks!

2

1 Answer 1

0

To resolve the issue, modify the code in flutter_carplay/ios/Classes/models/list/FCPListSection.swift at line 30. Update the sectionIndexTitle parameter to nil as shown below:

let listSection = CPListSection.init(items: items, header: header, sectionIndexTitle: nil)
This will prevent the alphabetic sorting issue since CarPlay won't attempt to use the sectionIndexTitle.

Not the answer you're looking for? Browse other questions tagged or ask your own question.