FlutterAndroidAuto class

An object in order to integrate Android auto in navigation and manage all user interface elements appearing on your screens displayed on the Android Auto screen.

Using Android auto, you can display content from your app on a customized user interface that is generated and hosted by the system itself. Control over UI elements, such as touch target size, font size and color, highlights, and so on.

Useful Links:

Constructors

FlutterAndroidAuto()
Creates an FlutterAndroidAuto and starts the connection.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListenerOnConnectionChange(dynamic onAndroidAutoConnectionChange(ConnectionStatusTypes status)) → void
Callback function will be fired when Android Auto connection status is changed. For example, when Android Auto is connected to the device, in the background state, or completely disconnected.
closeConnection() → void
A function that will disconnect all event listeners from Android Auto. The action will be irrevocable, and a new FlutterAndroidAuto controller must be created after this, otherwise Android Auto will be unusable.
forceUpdateRootTemplate() Future<void>
It will set the current root template again.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pauseConnection() → void
A function that will pause the all active event listeners from Android Auto.
removeListenerOnConnectionChange() → void
Removes the callback function that has been set before in order to listen on Android Auto connection status changed.
resumeConnection() → void
A function that will resume the paused all event listeners from Android Auto.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

connectionStatus String
Current CarPlay connection status. It will return one of ConnectionStatusTypes as String.
no setter
rootTemplate → dynamic
Getter for current root template. Return one of type CPTabBarTemplate, CPGridTemplate, CPListTemplate
no setter

Static Methods

pop() Future<bool>
It will present CPAlertTemplate modally.
popToRoot() Future<bool>
Removes all of the templates from the navigation hierarchy except the root template.
push({required AATemplate template}) Future<bool>
Removes a modal template. Since CPAlertTemplate and CPActionSheetTemplate are both modals, they can be removed. If animated is true, CarPlay animates the transition between templates. Adds a template to the navigation hierarchy and displays it.
setRootTemplate({required AATemplate template}) Future<void>
showSharedNowPlaying() Future<bool>
Didn't exist on Android Auto. If the player can be displayed, a button will be shown on the bottom right of the Android Auto screen.