{"id":13552054,"url":"https://github.com/oguzhnatly/flutter_carplay","last_synced_at":"2026-02-26T01:29:24.631Z","repository":{"id":37668120,"uuid":"400755319","full_name":"oguzhnatly/flutter_carplay","owner":"oguzhnatly","description":"🚗 Apple CarPlay and Android Auto for Flutter Apps. Aims to make it safe to use apps made with Flutter in the car by integrating with CarPlay and Android Auto.","archived":false,"fork":false,"pushed_at":"2026-01-14T14:01:48.000Z","size":16323,"stargazers_count":255,"open_issues_count":31,"forks_count":96,"subscribers_count":8,"default_branch":"master","last_synced_at":"2026-01-14T17:23:12.141Z","etag":null,"topics":["android","android-auto","android-automotive","android-automotive-os","apple","carplay","dart","dart-package","flutter","flutter-apps","flutter-package","flutter-plugin","googleflutter","ios","ios-swift","ios14","swift","swift5"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_carplay","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oguzhnatly.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"oguzhnatly","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-08-28T09:38:50.000Z","updated_at":"2026-01-14T14:08:43.000Z","dependencies_parsed_at":"2024-08-01T12:19:57.484Z","dependency_job_id":"4c4bd61a-8bf8-4f6f-be5e-8b6673f4c79d","html_url":"https://github.com/oguzhnatly/flutter_carplay","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/oguzhnatly/flutter_carplay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzhnatly%2Fflutter_carplay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzhnatly%2Fflutter_carplay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzhnatly%2Fflutter_carplay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzhnatly%2Fflutter_carplay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oguzhnatly","download_url":"https://codeload.github.com/oguzhnatly/flutter_carplay/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oguzhnatly%2Fflutter_carplay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28732328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-auto","android-automotive","android-automotive-os","apple","carplay","dart","dart-package","flutter","flutter-apps","flutter-package","flutter-plugin","googleflutter","ios","ios-swift","ios14","swift","swift5"],"created_at":"2024-08-01T12:01:58.259Z","updated_at":"2026-02-26T01:29:24.621Z","avatar_url":"https://github.com/oguzhnatly.png","language":"Dart","funding_links":["https://ko-fi.com/oguzhnatly","https://github.com/sponsors/oguzhnatly"],"categories":["Dart"],"sub_categories":[],"readme":"![Flutter CarPlay](https://raw.githubusercontent.com/oguzhnatly/flutter_carplay/master/previews/banner.png)\n\n# CarPlay and Android Auto with Flutter 🚗\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-orange.svg)](https://opensource.org/licenses/MIT)\n![Pub Version (including pre-releases)](https://img.shields.io/pub/v/flutter_carplay?include_prereleases)\n![Dart Pub Likes](https://badgen.net/pub/likes/flutter_carplay)\n![Dart Pub Multi-Platform](https://badgen.net/pub/flutter-platform/flutter_carplay)\n![DartPub Dart SDK](https://badgen.net/pub/sdk-version/flutter_carplay)\n\nFlutter Apps now on Apple CarPlay and Android Auto ! `flutter_carplay` aims to make it safe to use apps made with Flutter in the car by integrating with CarPlay and Android Auto. The package takes the things you want to do while driving and puts them on the car's built-in display.\n\n**✨ New in v1.2.0**: Android Auto support with limited list of feature. First step to future improvements.\n\n**✨ New in v1.1.0**: CarPlay apps can now launch automatically without requiring the Flutter app to be opened first, supporting true background launch capabilities.\n\n\u003e Apple announced some great features in iOS 14, one of which is users download CarPlay apps from the App Store and use them on iPhone like any other app. When an iPhone with a CarPlay app is connected to a CarPlay vehicle, the app icon appears on the CarPlay home screen. CarPlay apps are not separate apps—you add CarPlay support to an existing app.\n\u003e\n\u003e Your app uses the CarPlay framework to present UI elements to the user. iOS manages the display of UI elements and handles the interface with the car. Your app does not need to manage the layout of UI elements for different screen resolutions, or support different input hardware such as touchscreens, knobs, or touch pads.\n\nIt supports **only iOS 14.0+**. For general design guidance, see [Human Interface Guidelines for CarPlay Apps](https://developer.apple.com/design/human-interface-guidelines/carplay/overview/introduction/).\n\n## 📚 Documentation\n\nFor detailed guides and examples, check out the **[Wiki](https://github.com/oguzhnatly/flutter_carplay/wiki)**:\n\n- [Getting Started](https://github.com/oguzhnatly/flutter_carplay/wiki/Getting-Started) — Installation and basic setup\n- [iOS Setup](https://github.com/oguzhnatly/flutter_carplay/wiki/iOS-Setup) — CarPlay entitlements and configuration\n- [Android Auto Setup](https://github.com/oguzhnatly/flutter_carplay/wiki/Android-Auto-Setup) — Android Auto configuration\n- [Templates](https://github.com/oguzhnatly/flutter_carplay/wiki/Templates) — All templates with code examples\n- [Troubleshooting](https://github.com/oguzhnatly/flutter_carplay/wiki/Troubleshooting) — Common issues and solutions\n- [FAQ](https://github.com/oguzhnatly/flutter_carplay/wiki/FAQ) — Frequently asked questions\n\n# Summary\n\n- [Overview](#overview)\n- [Templates](#templates)\n- [Supports](#supports)\n- [What's New in latest versions](#whats-new-in-latest-versions)\n- [Road Map](#road-map)\n- [Contributing](#contributing)\n- [Requesting the CarPlay Entitlements](#requesting-the-carplay-entitlements)\n- [Disclaimer Before The Installation](#disclaimer-before-the-installation)\n- [Get Started](#get-started)\n- [Solve problems configuring your project](#solve-problems-configuring-your-project)\n- [Usage \u0026 Features](#usage--features)\n- [Templates](#templates-1)\n- [LICENSE](#license)\n\n# Overview\n\n![Flutter CarPlay Introduction](https://user-images.githubusercontent.com/54781138/131184549-3cb62678-ad3f-4d67-85fb-1410bd05eaff.gif)\n\nBefore you begin CarPlay integration, you must carefully read this section.\n\n[_The official App Programming Guidelines from Apple_](https://developer.apple.com/carplay/documentation/CarPlay-App-Programming-Guide.pdf) is the most valuable resource for understanding the needs, limits, and capabilities of CarPlay Apps. This documentation is a 49-page which clearly spells out the some actions required, and you are strongly advised to read it. If you are interested in a CarPlay System, [learn more about the MFi Program](https://mfi.apple.com/).\n\n# Templates\n\n## Car Play Templates\n\nCarPlay apps are built from a fixed set of user interface templates that iOS renders on the CarPlay screen. Each CarPlay app category can only use a restricted number of templates. Your app entitlement determines your access to templates.\n\n![Flutter CarPlay](https://raw.githubusercontent.com/oguzhnatly/flutter_carplay/master/previews/templates.png)\n\n## Android Auto Templates\n\nAndroid Auto apps built with the Android for Cars App Library are constructed using a fixed set of vehicle-optimized templates that the host renders on the car screen. Each Android Auto app category (e.g., Navigation, Point-of-Interest, IoT, etc.) can only use a restricted number of templates, and access to the Android for Cars App Library and its templates is generally restricted to supported app categories.\n\nhttps://developer.android.com/design/ui/cars/guides/templates/overview\n\n# Supports\n\n## Car Play Support\n\n`flutter_carplay` currently supports:\n\n- [x] Action Sheet Template\n- [x] Alert Template\n- [x] Grid Template\n- [x] List Template\n- [x] Tab Bar Template\n- [x] Information Template (contribution from [OSch11](https://github.com/OSch11/flutter_carplay))\n- [x] Point of Interest Template (contribution from [OSch11](https://github.com/OSch11/flutter_carplay))\n- [x] Now Playing Template (v1.1.0)\n\nBy evaluating this information, you can request for the relevant entitlement from Apple.\n\n## Android Auto Support\n\n- [x] List Template (limited support)\n- [x] Now Playing Template (Automatically handled by Android Auto system)\n\n# What's New in latest versions\n\n## v1.2.0\n\n- **🤖 Android Auto Support**: Initial support for Android Auto with limited\n  features (Thanks to [@EArminjon](https://github.com/EArminjon))\n\n## v1.1.0\n\n- **🚀 Background Launch Support**: CarPlay apps can now start automatically without requiring the Flutter app to be opened first (Thanks to [@vanlooverenkoen](https://github.com/vanlooverenkoen) and [@EArminjon](https://github.com/EArminjon))\n- **🎵 Now Playing Template**: Navigate to the shared instance of the Now Playing Template with `FlutterCarplay.showSharedNowPlaying()`\n- **🌐 Flexible Image Sources**: Load images from assets, local files (`file://`), or URLs (`https://`) (Thanks to [@vanlooverenkoen](https://github.com/vanlooverenkoen))\n- **🔧 Improved Completion Handlers**: Better reliability for list item interactions and template transitions\n- **📱 Flutter 3.32.x Compatibility**: Updated for the latest Flutter versions\n\nSpecial thanks to [@EArminjon](https://github.com/EArminjon), [@vanlooverenkoen](https://github.com/vanlooverenkoen), [@snipd-mikel](https://github.com/snipd-mikel), [@APIUM](https://github.com/APIUM), and all contributors who made this release possible!\n\n# Road Map\n\nOther templates will be supported in the future releases by `flutter_carplay`.\n\n## Car Play Road Map\n\n- [ ] Map Template\n- [ ] Search Template\n- [ ] Voice Control \u0026 \"Hey Siri\" for hands-free voice activation\n- [ ] Contact Template\n\n## Android Auto Road Map\n- [ ] Grid Template\n- [ ] Alert Template\n- [ ] Action Sheet Template\n- [ ] Information Template\n- [ ] Point of Interest Template\n- [ ] Map Template\n- [ ] Search Template\n- [ ] Voice Control \u0026 \"Hey Google\" for hands-free voice activation\n- [ ] Contact Template\n\n# Contributing\n\n- Pull Requests are always welcome.\n- Pull Request Reviews are even more welcome! I need help in testing.\n- If you are interested in contributing more actively, please contact me at info@oguzhanatalay.com Thanks!\n- If you want to help in coding, join [Discord Server](https://discord.gg/Xz6WVezFfh), so we can chat over there.\n\n# Requesting the CarPlay Entitlements\n\n\u003e All CarPlay apps require a CarPlay app entitlement.\n\nIf you want to build, run and publish your app on Apple with CarPlay compatibility or test or share the app with others through the TestfFlight or AdHoc, you must first request Apple to approve your Developer account for CarPlay access. The process can take from a few days to weeks or even months. It depends on the type of Entitlement you are requesting.\n\nTo request a CarPlay app entitlement from Apple, go to https://developer.apple.com/contact/carplay and provide information about your app, including the CarPlay App Category. You must also agree to the CarPlay Entitlement Addendum.\n\nWith this project, you can start developing and testing through Apple's CarPlay Simulator without waiting for CarPlay Entitlements. Apple will review your request. If your app meets the criteria for a CarPlay app, Apple will assign a CarPlay app entitlement to your Apple Developer Account and will notify you.\n\nWhether you are running the app through a simulator or developing it for distribution, you must ensure that the relevant entitlement key is added to the `Entitlements.plist` file. You must create an Entitlements.plist file if you do not already have one.\n\n## After you receive the CarPlay Entitlement\n\nAfter you receive the entitlement, you need to configure your Xcode project to use it, which involves several steps. You create and import a provisioning profile, and add an `Entitlements.plist` file. Your project’s code signing settings also require minor changes.\n\nFor more detailed instructions about how to create and import the CarPlay Provisioning Profile and add an Entitlements File to Xcode Project, go to [Configure your CarPlay-enabled app with the entitlements it requires.](https://developer.apple.com/documentation/carplay/requesting_the_carplay_entitlements)\n\n# Disclaimer Before The Installation\n\nYou are about to make some minor changes to your Xcode project after installing this package. This is due to the fact that It requires bitcode compilation which is missing in Flutter. You will procedure that will relocate (we won't remove or edit) some Flutter and its package engines. If you're planning to add this package to a critical project for you, you should proceed cautiously.\n\n**Please check [THE EXAMPLE PROJECT](https://github.com/oguzhnatly/flutter_carplay/tree/master/example) before you begin to the installation.**\n\nTHE INSTALLATION STEPS MAY BE DIFFICULT OR MAY NOT WORK PROPERLY WITH A FEW PACKAGES IN YOUR CURRENT PROJECT THAT COMMUNICATE WITH THE FLUTTER ENGINE. IF YOU ARE NOT COMPLETELY SURE WHAT YOU ARE DOING, PLEASE CREATE AN ISSUE, SO THAT I CAN HELP YOU TO SOLVE YOUR PROBLEM OR EXPLAIN WHAT YOU NEED TO.\n\nWHILE THE INSTALLATION PROGRESS, IF YOU TRY TO CHANGE ANYTHING (E.G. ANYTHING WORKS WITH FLUTTER ENGINE, ANYTHING IN GENERATED PLUGIN REGISTRANT SPECIFICALLY ITS LOCATION, ANY FILE NAME, ANY CLASS NAME, OR ANY OTHER FUNCTION THAT WORKS ON APPDELEGATE CLASS, TEMPLATE OR WINDOW APPLICATION DELEGATE SCENE NAMES USED IN INFO.PLIST, INCLUDED STORYBOARD NAMES, BUT NOT LIMITED TO THESE), YOU ARE MOST LIKELY TO ENCOUNTER IRREVERSIBLE ERRORS AND IT MAY DAMAGE TO YOUR PROJECT. I STRONGLY RECOMMEND THAT YOU SHOULD COPY YOUR EXISTING PROJECT BEFORE THE INSTALLATION.\n\n# Get Started\n\n## Car Play Get Started\n\n### Requirement Actions after Installation of the Package\n\n1. The iOS platform version must be set to 14.0. To make it global, navigate to `ios/Podfile` and copy the first two lines:\n\n```diff\n# Uncomment this line to define a global platform for your project\n+ platform :ios, '14.0'\n- # platform :ios, '9.0'\n```\n\nAfter changing the platform version, execute the following command in your terminal to update your pod files:\n\n```shell\n// For Apple Silicon M1 chips:\n$ cd ios \u0026\u0026 arch -x86_64 pod install --repo-update\n\n// For Intel chips:\n$ cd ios \u0026\u0026 pod install --repo-update\n```\n\n2. Open `ios/Runner.xcworkspace` in Xcode. In your project navigator, open `AppDelegate.swift`.\n\n   ![Flutter CarPlay](https://raw.githubusercontent.com/oguzhnatly/flutter_carplay/master/previews/step2.png)\n\n   Delete the specified codes below from the application function in `AppDelegate.swift`, and change it with the code below:\n\n```diff\nimport UIKit\nimport Flutter\n\nlet flutterEngine = FlutterEngine(name: \"SharedEngine\", project: nil, allowHeadlessExecution: true)\n\n@UIApplicationMain\n@objc class AppDelegate: FlutterAppDelegate {\n    override func application( _ application: UIApplication,\n                            didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -\u003e Bool {\n+      flutterEngine.run()\n+      GeneratedPluginRegistrant.register(with: flutterEngine)\n       return super.application(application, didFinishLaunchingWithOptions: launchOptions)\n    }\n}\n```\n\n3. Create a swift file named `SceneDelegate.swift` in the Runner folder (not in the xcode main project file) and add the code below:\n\n   ```swift\n   @available(iOS 13.0, *)\n   class SceneDelegate: UIResponder, UIWindowSceneDelegate {\n       var window: UIWindow?\n\n       func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {\n           guard let windowScene = scene as? UIWindowScene else { return }\n\n           window = UIWindow(windowScene: windowScene)\n\n           let controller = FlutterViewController.init(engine: flutterEngine, nibName: nil, bundle: nil)\n           controller.loadDefaultSplashScreenView()\n           window?.rootViewController = controller\n           window?.makeKeyAndVisible()\n       }\n   }\n   ```\n\n   ![Flutter CarPlay](https://raw.githubusercontent.com/oguzhnatly/flutter_carplay/master/previews/step3.png)\n\n4. One more step, open the `Info.plist` file whether in your favorite code editor or in the Xcode. I'm going to share the base code, so if you open in the Xcode, you can fill with the raw keys with the values.\n\n   ```xml\n   \u003ckey\u003eUIApplicationSceneManifest\u003c/key\u003e\n   \u003cdict\u003e\n     \u003ckey\u003eUIApplicationSupportsMultipleScenes\u003c/key\u003e\n     \u003cfalse /\u003e\n     \u003ckey\u003eUISceneConfigurations\u003c/key\u003e\n     \u003cdict\u003e\n       \u003ckey\u003eCPTemplateApplicationSceneSessionRoleApplication\u003c/key\u003e\n       \u003carray\u003e\n         \u003cdict\u003e\n           \u003ckey\u003eUISceneConfigurationName\u003c/key\u003e\n           \u003cstring\u003eCarPlay Configuration\u003c/string\u003e\n           \u003ckey\u003eUISceneDelegateClassName\u003c/key\u003e\n           \u003cstring\u003eflutter_carplay.FlutterCarPlaySceneDelegate\u003c/string\u003e\n         \u003c/dict\u003e\n       \u003c/array\u003e\n       \u003ckey\u003eUIWindowSceneSessionRoleApplication\u003c/key\u003e\n       \u003carray\u003e\n         \u003cdict\u003e\n           \u003ckey\u003eUISceneConfigurationName\u003c/key\u003e\n           \u003cstring\u003eDefault Configuration\u003c/string\u003e\n           \u003ckey\u003eUISceneDelegateClassName\u003c/key\u003e\n           \u003cstring\u003e$(PRODUCT_MODULE_NAME).SceneDelegate\u003c/string\u003e\n           \u003ckey\u003eUISceneStoryboardFile\u003c/key\u003e\n           \u003cstring\u003eMain\u003c/string\u003e\n         \u003c/dict\u003e\n       \u003c/array\u003e\n     \u003c/dict\u003e\n   \u003c/dict\u003e\n   ```\n\n### That's it, you're ready to build your first CarPlay app! 🚀 😎\n\n## Android Auto Get Started\n\n### Requirement Actions after Installation of the Package\n\n1. The Android platform version must be set to 21. Update your `android/app/build.gradle.kts` as below:\n\n```diff\n# Update to use at minimum api 21\n+ minSdk = 21\n- minSdk = 19\n```\n\n2. To setup Android Auto, you need to add a metadata tag in your `AndroidManifest.xml` file. Open `android/app/src/main/AndroidManifest.xml` and add the following : \n \n \nInside the `\u003cmanifest\u003e` tag:\n\n```xml\n\u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n    \n    \u003cuses-feature\n    android:name=\"android.software.car.app.library\"\n    android:required=\"false\" /\u003e\n    \u003cuses-permission android:name=\"androidx.car.app.MEDIA_TEMPLATES\"/\u003e\n    \n\u003c/manifest\u003e\n```\n\nInside the `\u003capplication\u003e` tag:\n\n```xml\n\u003capplication\u003e\n\n    \u003cmeta-data\n            android:name=\"com.google.android.gms.car.application\"\n            android:resource=\"@xml/automotive_app_desc\" /\u003e\n    \u003cmeta-data\n            android:name=\"androidx.car.app.minCarApiLevel\"\n            android:value=\"1\" /\u003e\n    \u003cservice\n            android:name=\"com.oguzhnatly.flutter_android_auto.AndroidAutoService\"\n            android:exported=\"true\"\u003e\n\n        \u003cintent-filter\u003e\n            \u003caction android:name=\"androidx.car.app.CarAppService\" /\u003e\n            \u003ccategory android:name=\"androidx.car.app.category.MEDIA\"/\u003e\n        \u003c/intent-filter\u003e\n    \u003c/service\u003e\n    \n\u003c/application\u003e\n```\n\n3. Create a new directory named `xml` inside `android/app/src/main/res/` if it doesn't already exist. Then, create a new XML file named `automotive_app_desc.xml` in the `res/xml/` directory and add the following content:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cautomotiveApp xmlns:android=\"http://schemas.android.com/apk/res/android\"\u003e\n    \n    \u003cuses name=\"template\" /\u003e\n    \u003cuses name=\"media\" /\u003e\n    \n\u003c/automotiveApp\u003e\n``` \n\nFor others use, please check official [Android Auto documentation](https://developer.android.com/training/cars/apps/auto).\n\n4. In your `MainActivity.kt` file, make the necessary to resuse and cache the engine as follow :\n\nOn Android Auto Service, use the same engine as the app if the app is already running, otherwise create a new one and cache using the id `FAAConstants.flutterEngineId`.\nTo avoid creating multiple engines, you need to override the `provideFlutterEngine` and `configureFlutterEngine` methods as below :\n\n```kotlin\npackage com.example.flutter_carplay_example\n\nimport android.content.Context\nimport io.flutter.embedding.android.FlutterActivity\nimport io.flutter.embedding.engine.FlutterEngine\nimport io.flutter.embedding.engine.FlutterEngineCache\nimport io.flutter.embedding.engine.dart.DartExecutor\nimport com.oguzhnatly.flutter_android_auto.FAAConstants\n\nclass MainActivity : FlutterActivity() {\n    override fun provideFlutterEngine(context: Context): FlutterEngine? {\n        // Use engine from cache if it has been started by Android Auto.\n        return FlutterEngineCache.getInstance().get(FAAConstants.flutterEngineId);\n    }\n\n    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {\n        // Cache the engine to make it usable by Android Auto.\n        FlutterEngineCache.getInstance().put(FAAConstants.flutterEngineId, flutterEngine)\n        super.configureFlutterEngine(flutterEngine)\n    }\n}\n```\n\n## Solve problems configuring your project\n\nTake a look at [this detailed issue reply](https://github.com/oguzhnatly/flutter_carplay/issues/3#issuecomment-926146126) if you got any error.\n\n## Usage \u0026 Features\n\nTo see a complete example for both CarPlay and Android Auto, check the example project.\n\n[**See Full Example**](https://github.com/oguzhnatly/flutter_carplay/blob/master/example/lib/main.dart)\n\n### Basic Usage for Car Play\n\n- Import the all classes that you need from just one file:\n\n```dart\nimport 'package:flutter_carplay/flutter_carplay.dart';\n```\n\n- Initialize the CarPlay Controllers, set a root template for the CarPlay view hierarchy and ensure to well update the root template :\n\n```dart\nfinal FlutterCarplay _flutterCarplay = FlutterCarplay();\n\nawait FlutterCarplay.setRootTemplate(\n  rootTemplate: CPTabBarTemplate(\n    templates: [\n      CPListTemplate(\n        sections: [\n          CPListSection(\n            items: [\n              CPListItem(\n                text: \"Item 1\",\n                detailText: \"Detail Text\",\n                onPress: (complete, self) {\n                  self.setDetailText(\"You can change the detail text.. 🚀\");\n                  Future.delayed(const Duration(seconds: 1), () {\n                    self.setDetailText(\"Customizable Detail Text\");\n                    complete();\n                  });\n                },\n              ),\n            ],\n            header: \"First Section\",\n          ),\n        ],\n        title: \"Home\",\n        showsTabBadge: false,\n        systemIcon: \"house.fill\",\n      ),\n    ],\n  ),\n  animated: true,\n);\n_flutterCarplay.forceUpdateRootTemplate();\n```\n\n\u003e You can set a root template without initializing the CarPlay Controllers, but some callback functions may not work or most likely you will get an error.\n\n\u003e It's recommended that you should set the root template in the first initState of your app.\n\n### Listen Connection Changes\n\nYou can detect connection changes, such as when CarPlay is connected to iPhone, is in the background, or is completely disconnected.\n\n```dart\n/// Add the listener\n_flutterCarplay.addListenerOnConnectionChange(onCarplayConnectionChange);\n\nvoid onCarplayConnectionChange(ConnectionStatusTypes status) {\n  // Do things when carplay connection status is:\n  // - ConnectionStatusTypes.connected\n  // - ConnectionStatusTypes.background\n  // - ConnectionStatusTypes.disconnected\n  // - ConnectionStatusTypes.unknown\n}\n\n/// Remove the listener\n_flutterCarplay.removeListenerOnConnectionChange();\n```\n\n### CarPlay API Methods\n\n#### **CarPlay.setRootTemplate**\n\nSets the root template of the navigation hierarchy. If a navigation\nhierarchy already exists, CarPlay replaces the entire hierarchy.\n\n- rootTemplate is a template to use as the root of a new navigation hierarchy. If one exists,\n  it will replace the current rootTemplate. **Must be one of the type:**\n  **CPTabBarTemplate**, **CPGridTemplate**, **CPListTemplate**. If not, it will throw an **TypeError**.\n- If animated is true, CarPlay animates the presentation of the template, but will be ignored\n  this flag when there isn’t an existing navigation hierarchy to replace.\n\n\u003e CarPlay cannot have more than 5 templates on one screen.\n\n```dart\nFlutterCarplay.setRootTemplate(\n  rootTemplate: /* CPTabBarTemplate, CPGridTemplate or CPListTemplate */,\n  animated: true,\n);\n// You need to call _flutterCarplay.forceUpdateRootTemplate(); after setting the root template\n```\n\n#### **CarPlay.push**\n\nAdds a template to the navigation hierarchy and displays it.\n\n- template is to add to the navigation hierarchy. **Must be one of the type:** **CPGridTemplate**, **CPListTemplate**. If not, it will throw an **TypeError**.\n- If animated is true, CarPlay animates the transition between templates.\n\n\u003e There is a limit to the number of templates that you can push onto the screen. All apps are limited to pushing up to 5 templates in depth, including the root template.\n\n```dart\nFlutterCarplay.push(\n  template: /* CPGridTemplate or CPListTemplate */,\n  animated: true,\n);\n```\n\n#### **CarPlay.pop**\n\nRemoves the top-most template from the navigation hierarchy.\n\n- If animated is true, CarPlay animates the transition between templates.\n- count represents how many times this function will occur.\n\n```dart\nFlutterCarplay.pop();\n// OR\nFlutterCarplay.pop(animated: true, count: 1);\n```\n\n#### **CarPlay.popToRoot**\n\nRemoves all of the templates from the navigation hierarchy except the root template.\n\n- If animated is true, CarPlay animates the presentation of the template.\n\n```dart\nFlutterCarplay.popToRoot(animated: true);\n```\n\n#### **CarPlay.popModal**\n\nRemoves a modal template. Since **CPAlertTemplate** and **CPActionSheetTemplate** are both modals, they can be removed.\n\n- If animated is true, CarPlay animates the transition between templates.\n\n```dart\nFlutterCarplay.popModal(animated: true);\n```\n\n#### **CarPlay.showSharedNowPlaying**\n\nNavigate to the shared instance of the Now Playing Template. This allows users to control media playback directly from CarPlay.\n\n- If animated is true, CarPlay animates the transition to the Now Playing template.\n\n```dart\nFlutterCarplay.showSharedNowPlaying(animated: true);\n```\n\n#### **CarPlay.connectionStatus**\n\nGetter for current CarPlay connection status. It will return one of **ConnectionStatusTypes** as String.\n\n```dart\nFlutterCarplay.connectionStatus\n```\n\n## Templates\n\nCarPlay supports general purpose templates such as alerts, lists, and tab bars. They are used to display contents on the CarPlay screen from the app. [The Developer Guide](https://developer.apple.com/carplay/documentation/CarPlay-App-Programming-Guide.pdf) contains more information on the templates that Apple supports.\n\n\u003e If you attempt to use a template not supported by your entitlement, an exception will occur at runtime.\n\n### Tab Bar Template\n\n![Flutter CarPlay](https://raw.githubusercontent.com/oguzhnatly/flutter_carplay/master/previews/tabbar_template.png)\n\nThe tab bar is a multi-purpose container for other templates, with each template occupying one tab in the tab bar.\n\n```dart\nfinal CPTabBarTemplate tabBarTemplate = CPTabBarTemplate(\n  templates: [\n    CPListTemplate(\n      sections: [\n        CPListSection(\n          items: [\n            CPListItem(\n              text: \"Item 1\",\n              detailText: \"Detail Text\",\n              onPress: (complete, self) {\n                // Returns the self class so that the item\n                // can be updated within self while loading\n                self.setDetailText(\"You can change the detail text.. 🚀\");\n                // complete function stops the loading\n                complete();\n              },\n              // Supports three image formats (v1.1.0+):\n              // - Asset: 'images/logo_flutter_1080px_clr.png'\n              // - File:  'file:///path/to/local/image.png'\n              // - URL:   'https://example.com/image.png'\n              image: 'images/logo_flutter_1080px_clr.png',\n            ),\n            CPListItem(\n              text: \"Item 2\",\n              detailText: \"Start progress bar\",\n              isPlaying: false,\n              playbackProgress: 0,\n              // asset name defined in pubspec.yaml\n              image: 'images/logo_flutter_1080px_clr.png',\n              onPress: (complete, self) {\n                complete();\n              },\n            ),\n          ],\n          header: \"First Section\",\n        ),\n      ],\n      title: \"Home\",\n      showsTabBadge: false,\n      systemIcon: \"house.fill\",\n    ),\n    CPListTemplate(\n      sections: [],\n      title: \"Settings\",\n      // If there is no section in the list template,\n      // empty view title and subtitle variants will be shown\n      emptyViewTitleVariants: [\"Settings\"],\n      emptyViewSubtitleVariants: [\n        \"No settings have been added here yet. You can start adding right away\"\n      ],\n      showsTabBadge: false,\n      systemIcon: \"gear\",\n    ),\n  ],\n);\n\nFlutterCarplay.setRootTemplate(rootTemplate: tabBarTemplate, animated: true);\n```\n\n### Grid Template\n\n![Flutter CarPlay](https://raw.githubusercontent.com/oguzhnatly/flutter_carplay/master/previews/grid_template.png)\n\nGrid Template is a specific style of menu that presents up to 8 items represented by an image and a title. Use the grid template to let people select from a fixed list of categories.\n\n```dart\nfinal CPGridTemplate gridTemplate = CPGridTemplate(\n  title: \"Grid Template\",\n  buttons: [\n    for (var i = 1; i \u003c 9; i++)\n      CPGridButton(\n        titleVariants: [\"Item $i\"],\n        image: 'images/logo_flutter_1080px_clr.png',\n        onPress: () {\n          print(\"Grid Button $i pressed\");\n        },\n      ),\n  ],\n);\n\nFlutterCarplay.push(template: gridTemplate, animated: true);\n// OR\nFlutterCarplay.setRootTemplate(rootTemplate: gridTemplate, animated: true);\n// You need to call _flutterCarplay.forceUpdateRootTemplate(); after setting the root template\n```\n\n### Alert Template\n\n![Flutter CarPlay](https://raw.githubusercontent.com/oguzhnatly/flutter_carplay/master/previews/alert_template.png)\n\nAlerts provide important information about your app's status. An alert consists of a title and one or more buttons, depending on the type.\n\n\u003e If underlying conditions permit, alerts can be dismissed programatically.\n\n```dart\nfinal CPAlertTemplate alertTemplate = CPAlertTemplate(\n  titleVariants: [\"Alert Title\"],\n  actions: [\n    CPAlertAction(\n      title: \"Okay\",\n      style: CPAlertActionStyles.normal,\n      onPress: () {\n        print(\"Okay pressed\");\n        FlutterCarplay.popModal(animated: true);\n      },\n    ),\n    CPAlertAction(\n      title: \"Cancel\",\n      style: CPAlertActionStyles.cancel,\n      onPress: () {\n        print(\"Cancel pressed\");\n        FlutterCarplay.popModal(animated: true);\n      },\n    ),\n    CPAlertAction(\n      title: \"Remove\",\n      style: CPAlertActionStyles.destructive,\n      onPress: () {\n        print(\"Remove pressed\");\n        FlutterCarplay.popModal(animated: true);\n      },\n    ),\n  ],\n),\n\nFlutterCarplay.showAlert(template: alertTemplate, animated: true);\n```\n\n### Action Sheet Template\n\n![Flutter CarPlay](https://raw.githubusercontent.com/oguzhnatly/flutter_carplay/master/previews/actionsheet_template.png)\n\nAction Sheet Template is a type of alert that appears when control or action is taken and gives a collection of options based on the current context.\n\n\u003e Use action sheets to let people initiate tasks, or to request confirmation before performing a potentially destructive operation.\n\n```dart\nfinal CPActionSheetTemplate actionSheetTemplate = CPActionSheetTemplate(\n  title: \"Action Sheet Template\",\n  message: \"This is an example message.\",\n  actions: [\n    CPAlertAction(\n      title: \"Cancel\",\n      style: CPAlertActionStyles.cancel,\n      onPress: () {\n        print(\"Cancel pressed in action sheet\");\n        FlutterCarplay.popModal(animated: true);\n      },\n    ),\n    CPAlertAction(\n      title: \"Dismiss\",\n      style: CPAlertActionStyles.destructive,\n      onPress: () {\n        print(\"Dismiss pressed in action sheet\");\n        FlutterCarplay.popModal(animated: true);\n      },\n    ),\n    CPAlertAction(\n      title: \"Ok\",\n      style: CPAlertActionStyles.normal,\n      onPress: () {\n        print(\"Ok pressed in action sheet\");\n        FlutterCarplay.popModal(animated: true);\n      },\n    ),\n  ],\n);\n\nFlutterCarplay.showActionSheet(template: actionSheetTemplate, animated: true);\n```\n\n### List Template\n\n![Flutter CarPlay](https://raw.githubusercontent.com/oguzhnatly/flutter_carplay/master/previews/list_template.png)\n\nA list presents data as a scrolling, single-column table of rows that can be divided into sections. Lists are ideal for text-based content, and can be used as a means of navigation for hierarchical information. Each item in a list can include attributes such as an icon, title, subtitle, disclosure indicator, progress indicator, playback status, or read status.\n\n\u003e Some cars dynamically limit lists to a maximum of 12 items. You always need to be prepared to handle the case where only 12 items can be shown. Items beyond the maximum will not be shown.\n\n```dart\nfinal CPListTemplate listTemplate = CPListTemplate(\n  sections: [\n    CPListSection(\n      items: [\n        CPListItem(\n          text: \"Item 1\",\n          detailText: \"Detail Text\",\n          onPress: (complete, self) {\n            // Returns the self class so that the item\n            // can be updated within self while loading\n            self.setDetailText(\"You can change the detail text.. 🚀\");\n            // complete function stops the loading\n            complete();\n          },\n          image: 'images/logo_flutter_1080px_clr.png',\n        ),\n        CPListItem(\n          text: \"Item 2\",\n          detailText: \"Start progress bar\",\n          isPlaying: false,\n          playbackProgress: 0,\n          // asset name defined in pubspec.yaml\n          image: 'images/logo_flutter_1080px_clr.png',\n          onPress: (complete, self) {\n            complete();\n          },\n        ),\n      ],\n      header: \"First Section\",\n    ),\n  ],\n  title: \"Home\",\n  showsTabBadge: false,\n  systemIcon: \"house.fill\",\n  // If there is no section in the list template,\n  // empty view title and subtitle variants will be shown\n  emptyViewTitleVariants: [\"Home\"],\n  emptyViewSubtitleVariants: [\n    \"Nothing has added here yet. You can start adding right away\"\n  ],\n);\n\nFlutterCarplay.push(template: listTemplate, animated: true);\n// OR\nFlutterCarplay.setRootTemplate(rootTemplate: listTemplate, animated: true);\n// You need to call _flutterCarplay.forceUpdateRootTemplate(); after setting the root template\n```\n\n### Information Template\n\n![Flutter CarPlay](https://raw.githubusercontent.com/oguzhnatly/flutter_carplay/master/previews/information_template.png)\n\nAn Information Template shows a list of items, and actions (max. three)) as array of text buttons.\n\n\u003e The list is limited to 10 items. Items beyond the maximum will not be shown. Up to three actions are supported.\n\n```dart\nfinal CPInformationTemplate informationTemplate = CPInformationTemplate(\n  title: \"Title\",\n  layout: CPInformationTemplateLayout.twoColumn,\n  actions: [\n    CPTextButton(\n      title: \"Button Title 1\",\n      onPress: () {\n        print(\"Button 1\");\n      }\n    ),\n    CPTextButton(\n      title: \"Button Title 2\",\n      onPress: () {\n        print(\"Button 2\");\n       }\n    ),\n  ],\n  informationItems: [\n    CPInformationItem(title: \"Title\", detail: \"Detail\"),\n  ]\n);\n\nFlutterCarplay.push(template: informationTemplate, animated: true);\n// OR\nFlutterCarplay.setRootTemplate(rootTemplate: informationTemplate, animated: true);\n// You need to call _flutterCarplay.forceUpdateRootTemplate(); after setting the root template\n```\n\n### Point Of Interest Template\n\n![Flutter CarPlay](https://raw.githubusercontent.com/oguzhnatly/flutter_carplay/master/previews/point_of_interest_template.png)\n\nA Point Of Interest template shows multiple points of interest on a Map\nThe map section is determined by the points of interest.\n\n\u003e The Template is limited to 12 Points of Interest.\n\n```dart\n final CPPointOfInterestTemplate pointOfInterestTemplate =\n   CPPointOfInterestTemplate(title: \"Title\", poi: [\n     CPPointOfInterest(\n       latitude: 51.5052,\n       longitude: 7.4938,\n       title: \"Title\",\n       subtitle: \"Subtitle\",\n       summary: \"Summary\",\n       detailTitle: \"DetailTitle\",\n       detailSubtitle: \"detailSubtitle\",\n       detailSummary: \"detailSummary\",\n       image: \"images/logo_flutter_1080px_clr.png\",\n       primaryButton: CPTextButton(\n         title: \"Primary\",\n         onPress: () {\n           print(\"Primary button pressed\");\n         }\n       ),\n       secondaryButton: CPTextButton(\n         title: \"Secondary\",\n         onPress: () {\n           print(\"Secondary button pressed\");\n         }))\n    ]);\n\n    FlutterCarplay.push(template: pointOfInterestTemplate, animated: true);\n    // OR\n    FlutterCarplay.setRootTemplate(rootTemplate: pointOfInterestTemplate, animated: true);\n    // You need to call _flutterCarplay.forceUpdateRootTemplate(); after setting the root template\n```\n\n### Now Playing Template\n\nThe Now Playing template provides a standardized interface for media playback controls in CarPlay. It uses the system's shared instance and integrates with your app's media session.\n\n```dart\n// Navigate to the Now Playing template\nFlutterCarplay.showSharedNowPlaying(animated: true);\n```\n\n\u003e **Note**: The Now Playing template displays information from your app's active media session. Make sure your app is properly configured with AVAudioSession and media playback controls for the best experience.\n\n\u003e **Multiple Calls Safe**: The `showSharedNowPlaying()` method can be called multiple times safely without causing issues.\n\n# Support\n\nIf this package has been helpful, consider supporting its development:\n\n[![Sponsor on GitHub](https://img.shields.io/badge/Sponsor-GitHub-ea4aaa?logo=github)](https://github.com/sponsors/oguzhnatly)\n\nYour support helps maintain and improve this package! ❤️\n\n# Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=oguzhnatly/flutter_carplay\u0026type=Date)](https://star-history.com/#oguzhnatly/flutter_carplay\u0026Date)\n\n# LICENSE\n\n[**MIT License**](https://github.com/oguzhnatly/flutter_carplay/blob/master/LICENSE)\n\nCopyright (c) 2021 Oğuzhan Atalay\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foguzhnatly%2Fflutter_carplay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foguzhnatly%2Fflutter_carplay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foguzhnatly%2Fflutter_carplay/lists"}