addListenerOnConnectionChange method

void addListenerOnConnectionChange(
  1. dynamic onCarplayConnectionChange(
    1. CPConnectionStatusTypes status
    )
)

Callback function will be fired when CarPlay connection status is changed. For example, when CarPlay is connected to the device, in the background state, or completely disconnected.

See also: CPConnectionStatusTypes

Implementation

void addListenerOnConnectionChange(
  Function(CPConnectionStatusTypes status) onCarplayConnectionChange,
) {
  _onCarplayConnectionChange = onCarplayConnectionChange;
}