{"id":28265747,"url":"https://github.com/situmtech/flutter-ar","last_synced_at":"2025-10-06T19:04:09.912Z","repository":{"id":218507054,"uuid":"743977102","full_name":"situmtech/flutter-ar","owner":"situmtech","description":"Bring AR to Situm Wayfinding","archived":false,"fork":false,"pushed_at":"2025-01-08T08:14:31.000Z","size":86363,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-20T13:14:50.967Z","etag":null,"topics":["augmented-reality","indoor-navigation","indoor-positioning","situm"],"latest_commit_sha":null,"homepage":"https://situm.com/en/","language":"Dart","has_issues":false,"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/situmtech.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-16T11:39:27.000Z","updated_at":"2024-12-03T12:22:05.000Z","dependencies_parsed_at":"2024-04-17T06:40:59.916Z","dependency_job_id":null,"html_url":"https://github.com/situmtech/flutter-ar","commit_stats":null,"previous_names":["situmtech/flutter-ar"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/situmtech/flutter-ar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/situmtech%2Fflutter-ar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/situmtech%2Fflutter-ar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/situmtech%2Fflutter-ar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/situmtech%2Fflutter-ar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/situmtech","download_url":"https://codeload.github.com/situmtech/flutter-ar/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/situmtech%2Fflutter-ar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278663360,"owners_count":26024388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["augmented-reality","indoor-navigation","indoor-positioning","situm"],"created_at":"2025-05-20T13:13:40.609Z","updated_at":"2025-10-06T19:04:09.908Z","avatar_url":"https://github.com/situmtech.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Situm Flutter AR\n\n\u003e [!NOTE]  \n\u003e This plugin is a work in progress.\n\n\u003cp align=\"center\"\u003e \u003cimg width=\"233\" src=\"https://situm.com/wp-content/themes/situm/img/logo-situm.svg\" style=\"margin-bottom:1rem\" /\u003e\n\u003ch1 align=\"center\"\u003e@situm/flutter-ar\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\" style=\"text-align:center\"\u003e\n\nBring AR to [Situm Wayfinding](https://situm.com/wayfinding).\n\n\u003c/p\u003e\n\n\u003cdiv align=\"center\" style=\"text-align:center\"\u003e\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Pub Version](https://img.shields.io/pub/v/situm_flutter?color=blueviolet)](https://pub.dev/packages/situm_flutter)\n[![Flutter](https://img.shields.io/badge/{/}-flutter-blueviolet)](https://flutter.dev/)\n\n\u003c/div\u003e\n\n## Getting Started\n\nBy following this guide, you'll be able to integrate Situm AR plugin into your own application. Situm AR plugin is composed by:\n\n1. Flutter Code: available in this repo.\n2. AR binaries: available upon request through support@situm.com. You'll need them to compile. We have 2 AR binaries:\n   1. Android. We'll deliver a folder called **unityExport**\n   2. iOS. We'll deliver a **UnityFramework.xcframework**.\n\nAdditionally, we've created an [example app](./example) in case you want to take a look at a full application using both Situm SDK and Situm AR app.\n\n### Common setup:\n\n#### Setup Situm SDK Flutter plugin:\n\nFirst of all, you'll need a Situm account and a venue configured with Situm positioning \u0026 maps. To do this, follow [this guide](https://situm.com/docs/first-steps-for-wayfinding/).\n\nFirst, you'll need to setup Situm SDK Flutter plugin following the instructions contained on the following [link](https://github.com/situmtech/flutter?tab=readme-ov-file#set-up-your-situm-credentials).\n\n#### Install Situm AR Flutter plugin\n\nThen, you may install [situm_flutter_ar](https://pub.dev/packages/situm_flutter_ar) plugin:\n\n```\nflutter pub add situm_flutter_ar\n```\n\n### iOS specific steps:\n\n1. Import the **UnityFramework.xcframework** into your **Runner** project in **XCode**.\n\n   \u003cimg src=\"https://raw.githubusercontent.com/situmtech/flutter-ar/main/images/ios-import-1.png\"  width=\"50%\"\u003e\n\n2. During the impoort, make sure you select the following options:\n\n- Check \"Copy items if needed\".\n- Select \"Create groups\" for \"Added folders\".\n- Add to target \"Runner\".\n\n  \u003cimg src=\"https://raw.githubusercontent.com/situmtech/flutter-ar/main/images/ios-import-2.png\"  width=\"50%\"\u003e\n\n3. In the main Target of your app, under General \u003e \"Frameworks, Libraries and Embedded Content\",\n   select \"Embed \u0026 Sign\" for the **UnityFramework.xcframework**.\n\n   \u003cimg src=\"https://raw.githubusercontent.com/situmtech/flutter-ar/main/images/ios-import-3.png\"  width=\"80%\"\u003e\n\n4. In your `Info.plist` file, add the `UIViewControllerBasedStatusBarAppearance` key with a value of `false` to prevent\n   UnityFramework from modifying the visibility of the system's status bar:\n   ```\n   \u003ckey\u003eUIViewControllerBasedStatusBarAppearance\u003c/key\u003e\n   \u003cfalse/\u003e\n   ```\n\n5. Under `\u003cyour_flutter_project\u003e/ios`, run:\n   ```\n   pod install\n   ```\n\nAfter this, you may compile \u0026 run your application:\n\n```\nflutter run\n```\n\n#### Android setup:\n\n1. Copy the AR binaries (**unityExport** folder in Android) into the **android** folder of your Flutter project.\n2. Add the following snippet to the end of the `\u003cyour_flutter_project\u003e/android/settings.gradle` file (surely you have similar includes in there!):\n   ```\n   include ':unityExport'\n   include ':unityExport:xrmanifest.androidlib'\n   ```\n3. Complete your `\u003cyour_flutter_project\u003e/android/build.gradle` using the following indications:\n   ```\n   //...\n   allprojects {\n     repositories {\n       // You may already have these three ones:\n       google()\n       mavenCentral()\n       maven { url \"https://repo.situm.es/artifactory/libs-release-local\" }\n       // Add this:\n       flatDir {\n         dirs \"${project(':unityExport').projectDir}/libs\"\n       }\n     }\n   ```\n4. Add the following permission to the `\u003cyour_flutter_project\u003e/android/app/src/main/AndroidManifest.xml` file:\n   ```\n   \u003cuses-permission android:name=\"android.permission.WAKE_LOCK\"/\u003e\n   ```\n5. Add this line to your `gradle.properties` file:\n   ```\n    unityStreamingAssets=.unity3d, google-services-desktop.json, google-services.json, GoogleService-Info.plist\n   ```\n\nAfter this, you may compile your application:\n\n```\nflutter run\n```\n\n### Integrate the ARWidget in your app:\n\nWe assume that you already have an application that uses Situm SDK. You may build one by following our [Quickstart Guide for Flutter](https://situm.com/docs/05-a-basic-flutter-app/).\n\nThe [example app of this repository](./example/lib/main.dart) contains a complete example on how to integrate the AR plugin. Nonetheless the main steps are described below.\n\nFirst of all, you'll need to wrap your **MapView** widget inside the **ARWidget**. This way, the user will be presented with the **MapView**, and upon clicking on an \"AR button\" (only visible on dynamic navigation), the **ARWidget** will appear on the screen.\n\n```\n  @override\n  Widget build(BuildContext context) {\n    return Scaffold(\n      body: ARWidget(\n        buildingIdentifier: buildingIdentifier,\n        onCreated: onUnityViewCreated,\n        onPopulated: onUnityViewPopulated,\n        onDisposed: onUnityViewDisposed,\n        mapView: MapView(\n          key: const Key(\"situm_map\"),\n          configuration: MapViewConfiguration(\n            // Your Situm credentials.\n            // Copy config.dart.example if you haven't already.\n            situmApiKey: situmApiKey,\n            // Set your building identifier:\n            buildingIdentifier: buildingIdentifier,\n            viewerDomain: \"https://map-viewer.situm.com\",\n            apiDomain: \"https://dashboard.situm.com\",\n            remoteIdentifier: remoteIdentifier,\n            persistUnderlyingWidget: true,\n          ),\n          onLoad: onMapViewLoad,\n        ),\n      ),\n    );\n  }\n```\n\nThen, you'll also need to forward certain events from the Situm SDK to the AR Plugin:\n\n```\n@override\n  void initState() {\n    super.initState();\n    //Init Situm SDK\n    var sdk = SitumSdk();\n    sdk.init(null, situmApiKey);\n\n    // Location:\n    sdk.onLocationUpdate((location) {\n      //...\n      arController.setLocation(location);\n    });\n\n    // Navigation:\n    sdk.onNavigationCancellation(() {\n      //...\n      arController.setNavigationCancelled();\n    });\n\n    sdk.onNavigationDestinationReached(() {\n      //...\n      arController.setNavigationDestinationReached();\n    });\n\n    sdk.onNavigationOutOfRoute(() {\n      //...\n      arController.setNavigationOutOfRoute();\n    });\n\n    sdk.onNavigationProgress((progress) {\n      //...\n      arController.setNavigationProgress(progress);\n    });\n\n    sdk.onNavigationStart((route) {\n      //...\n      arController.setNavigationStart(route);\n    });\n\n    //...\n\n    startPositioning();\n  }\n```\n\nAlso, you'll need to make sure that the AR Plugin can interact with the **MapView**:\n\n```\n void onMapViewLoad(MapViewController controller) {\n\n    //...\n\n    arController.onMapViewLoad(controller);\n    controller.onPoiSelected((poiSelectedResult) {\n      arController.setSelectedPoi(poiSelectedResult.poi);\n    });\n  }\n```\n\nFinally, you'll need to ask for the Camera permissions (additionally to the [ones needed by Situm Flutter SDK](https://situm.com/docs/05-a-basic-flutter-app/)). Here's an [example](https://github.com/situmtech/flutter-ar/blob/3e28e0e3968547ef5a63175c1255e0ca7ca86a09/example/lib/main.dart#L148) on how we do it.\n\n## Versioning\n\nPlease refer to [CHANGELOG.md](./CHANGELOG.md) for a list of notable changes for each version of the\nplugin.\n\nYou can also see the [tags on this repository](./tags).\n\n---\n\n## Submitting contributions\n\nYou will need to sign a Contributor License Agreement (CLA) before making a\nsubmission. [Learn more here](https://situm.com/contributions/).\n\n---\n\n## License\n\nThis project is licensed under the MIT - see the [LICENSE](./LICENSE) file for further details.\n\n---\n\n## More information\n\nMore info is available at our [Developers Page](https://situm.com/docs/01-introduction/).\n\n---\n\n## Support information\n\nFor any question or bug report, please send an email\nto [support@situm.com](mailto:support@situm.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitumtech%2Fflutter-ar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsitumtech%2Fflutter-ar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsitumtech%2Fflutter-ar/lists"}