CPVoiceControlTemplate class

A modal voice indicator for approved CarPlay app categories.

Use FlutterCarplay.showVoiceControl, never root, push or tab presentation. The first state is displayed on presentation. This template does not record audio, transcribe speech or activate Siri.

Inheritance

Constructors

CPVoiceControlTemplate({required List<CPVoiceControlState> voiceControlStates, List<CPBarButton> leadingNavigationBarButtons = const [], List<CPBarButton> trailingNavigationBarButtons = const [], VoidCallback? onDismiss, String? id})

Properties

hashCode → int
The hash code for this object.
no setterinherited
leadingNavigationBarButtons → List<CPBarButton>
Navigation buttons require iOS 26.4 and an SDK containing that API.
final
onDismiss → VoidCallback?
Called once when dismissed, cancelled while presenting, or disconnected. Stop recording and speech playback here. A rejected presentation does not call this callback because the session never opened.
final
onPop → VoidCallback?
Called when this template is popped from the navigation stack.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showsTabBadge → bool
An indicator you use to call attention to the tab. iOS 14.0+ | iPadOS 14.0+ | Mac Catalyst 14.0+
finalinherited
systemIcon → String?
An image that represents the content of the tab. Note:
finalinherited
tabTitle → String?
A short title that describes the content of the tab. iOS 14.0+ | iPadOS 14.0+ | Mac Catalyst 14.0+
finalinherited
trailingNavigationBarButtons → List<CPBarButton>
final
uniqueId → String
final
voiceControlStates → List<CPVoiceControlState>
final

Methods

activateState(String identifier) → Future<bool>
Returns whether the host reports this identifier as active after the call. CarPlay can ignore rapid changes due to its state activation rate limit.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
override
toString() → String
A string representation of this object.
inherited

Operators

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