{"id":20963676,"url":"https://github.com/olexale/arkit_flutter_plugin","last_synced_at":"2025-05-14T15:06:05.952Z","repository":{"id":41094924,"uuid":"180994140","full_name":"olexale/arkit_flutter_plugin","owner":"olexale","description":"ARKit Flutter Plugin","archived":false,"fork":false,"pushed_at":"2025-02-02T20:02:55.000Z","size":22345,"stargazers_count":816,"open_issues_count":91,"forks_count":231,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-04-12T20:43:39.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/olexale.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,"publiccode":null,"codemeta":null}},"created_at":"2019-04-12T11:25:36.000Z","updated_at":"2025-03-21T16:00:16.000Z","dependencies_parsed_at":"2022-07-14T08:18:10.538Z","dependency_job_id":"65d24548-7246-4e7e-ae01-af059d338923","html_url":"https://github.com/olexale/arkit_flutter_plugin","commit_stats":{"total_commits":348,"total_committers":22,"mean_commits":"15.818181818181818","dds":0.5948275862068966,"last_synced_commit":"86c507497090698c265bdbab1e2a14b989bc46e3"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexale%2Farkit_flutter_plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexale%2Farkit_flutter_plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexale%2Farkit_flutter_plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olexale%2Farkit_flutter_plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olexale","download_url":"https://codeload.github.com/olexale/arkit_flutter_plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254169016,"owners_count":22026207,"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","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":[],"created_at":"2024-11-19T02:47:51.700Z","updated_at":"2025-05-14T15:06:05.925Z","avatar_url":"https://github.com/olexale.png","language":"Dart","readme":"![logo](./logo.png)\n\n[![Codemagic build status](https://api.codemagic.io/apps/5cb0a01178f5790010ab6978/5cb0a01178f5790010ab6977/status_badge.svg)](https://codemagic.io/apps/5cb0a01178f5790010ab6978/5cb0a01178f5790010ab6977/latest_build) [![flutter awesome](https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true\u0026style=flat-square)](https://github.com/Solido/awesome-flutter)\n[![pub package](https://img.shields.io/pub/v/arkit_plugin.svg)](https://pub.dartlang.org/packages/arkit_plugin)\n\n**Note**: ARKit is only supported by mobile devices with A9 or later processors (iPhone 6s/7/SE/8/X, iPad 2017/Pro) on iOS 11 and newer. For some features iOS 12 or newer is required. Flutter \u003e=3.19.0 supports iOS 12.0 and newer, if iOS 11 support is needed use the plugin version before 1.1.0.\n\n## Usage\n\n### Add dependency\n\nFollow the [installation instructions](https://pub.dartlang.org/packages/arkit_plugin#-installing-tab-) from Dart Packages site.\n\n### Update Info.plist\n\nARKit uses the device camera, so do not forget to provide the `NSCameraUsageDescription`. You may specify it in `Info.plist` like that:\n```xml\n    \u003ckey\u003eNSCameraUsageDescription\u003c/key\u003e\n    \u003cstring\u003eDescribe why your app needs AR here.\u003c/string\u003e\n```\n\n### Update Podfile\n\nAt the top level of the `ios` folder uncomment the second line in the `Podfile` and change the iOS minimum version from `9.0` to the appropriate one.\nThe minimum supported iOS version is `12.0`. For body tracking minimum version must be `13.0`.\n\nFrom:\n```ruby\n# platform :ios, '9.0'\n```\nTo:\n\n```ruby\nplatform :ios, '12.0'\n```\n\nNOTE: If when running for the first time you get a _cocoapods_ error, delete the `Podfile.lock` file in the `ios` folder. Open the `ios` folder in the terminal and run:\n```\npod install\n```\n\n### Write the app\n\nThe simplest code example:\n\n```dart\nimport 'package:flutter/material.dart';\nimport 'package:arkit_plugin/arkit_plugin.dart';\nimport 'package:vector_math/vector_math_64.dart';\n\nvoid main() =\u003e runApp(MaterialApp(home: MyApp()));\n\nclass MyApp extends StatefulWidget {\n  @override\n  _MyAppState createState() =\u003e _MyAppState();\n}\n\nclass _MyAppState extends State\u003cMyApp\u003e {\n  late ARKitController arkitController;\n\n  @override\n  void dispose() {\n    arkitController.dispose();\n    super.dispose();\n  }\n\n  @override\n  Widget build(BuildContext context) =\u003e Scaffold(\n      appBar: AppBar(title: const Text('ARKit in Flutter')),\n      body: ARKitSceneView(onARKitViewCreated: onARKitViewCreated));\n\n  void onARKitViewCreated(ARKitController arkitController) {\n    this.arkitController = arkitController;\n    final node = ARKitNode(\n        geometry: ARKitSphere(radius: 0.1), position: Vector3(0, 0, -0.5));\n    this.arkitController.add(node);\n  }\n}\n```\nResult:\n\n![flutter](./demo.gif)\n\n## Examples\n\nI would highly recommend to review the [sample](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/main.dart) from the `Example` folder inside the plugin. Some samples rely on [this Earth image](https://upload.wikimedia.org/wikipedia/commons/9/97/The_Earth_seen_from_Apollo_17.jpg)\n\n| Name        | Description                                                                 | Link | Demo |\n|-------------|-----------------------------------------------------------------------------|------------------------------------------------------|----|\n| Hello World | The simplest scene with different geometries.                               | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/hello_world.dart)| [twitter](https://twitter.com/OlexaLe/status/1118441432707149824) |\n| Check configuration | Shows which kinds of AR configuration are supported on the device           | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/check_support_page.dart)|  |\n| Earth       | Sphere with an image texture and rotation animation.                        | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/earth_page.dart) | [twitter](https://twitter.com/OlexaLe/status/1118441432707149824) |\n| Tap         | Sphere which handles tap event.                                             | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/tap_page.dart) | [twitter](https://twitter.com/OlexaLe/status/1118441432707149824) |\n| Midas         | Turns walls, floor, and Earth itself into gold by tap.                      | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/midas_page.dart) | [twitter](https://twitter.com/OlexaLe/status/1401561106552967173) |\n| Plane Detection | Detects horizontal plane.                                                   | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/plane_detection_page.dart) | [twitter](https://twitter.com/OlexaLe/status/1118870195743883266) |\n| Distance tracking | Detects horizontal plane and track distance on it.                          | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/distance_tracking_page.dart) | [twitter](https://twitter.com/OlexaLe/status/1121022506180149248) |\n| Measure | Measures distances                                                          | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/measure_page.dart) | [twitter](https://twitter.com/OlexaLe/status/1121022506180149248) |\n| Physics | A sphere and a plane with dynamic and static physics                        | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/physics_page.dart) | [twitter](https://twitter.com/OlexaLe/status/1119233047851884547) |\n| Image Detection | Detects Earth photo and puts a 3D object near it.                           | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/image_detection_page.dart) | [twitter](https://twitter.com/OlexaLe/status/1120287361974378496) |\n| Network Image Detection | Detects Mars photo and puts a 3D object near it.                            | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/network_image_detection.dart) | |\n| Custom Light | Hello World scene with a custom light spot.                                 | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/custom_light_page.dart) | |\n| Light Estimation | Estimates and applies the light around you.                                 | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/light_estimate_page.dart) | [twitter](https://twitter.com/OlexaLe/status/1120671744426221573) |\n| Custom Object | Place custom object on plane with coaching overlay.                         | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/custom_object_page.dart) | [twitter](https://twitter.com/OlexaLe/status/1121037162852569090) |\n| Load .gltf .glb | Load .gltf or .glb from the Flutter assets or the Documents folder.         | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/load_gltf_or_glb_page.dart) | |\n| Occlusion | Spheres which are not visible after horizontal and vertical planes.         | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/occlusion_page.dart)|[twitter](https://twitter.com/OlexaLe/status/1121421315364274177) |\n| Manipulation | Custom objects with pinch and rotation events.                              | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/manipulation_page.dart)|[twitter](https://twitter.com/OlexaLe/status/1123893412279791616) |\n| Face Tracking | Face mask sample.                                                           | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/face_detection_page.dart)|[twitter](https://twitter.com/OlexaLe/status/1143483440278454277) |\n| Body Tracking | Dash that follows your hand.                                                | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/body_tracking_page.dart)|[twitter](https://twitter.com/OlexaLe/status/1449408839393087494) |\n| Panorama | 360 photo.                                                                  | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/panorama_page.dart)|[twitter](https://twitter.com/OlexaLe/status/1154665277654781952) |\n| Video | 360 video.                                                                  | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/video_page.dart)|[twitter](https://twitter.com/OlexaLe/status/1406997587132026885) |\n| Custom Animation | Custom object animation. Port of https://github.com/eh3rrera/ARKitAnimation | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/custom_animation_page.dart)|[twitter](https://twitter.com/OlexaLe/status/1173587705206366209) |\n| Widget Projection | Flutter widgets in AR                                                       | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/widget_projection.dart)|[twitter](https://twitter.com/OlexaLe/status/1174678765592567814) |\n| Real Time Updates | Calls a function once per frame                                             | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/real_time_updates.dart)| |\n| Snapshot | Make a photo of AR content                                                  | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/snapshot_scene.dart)| |\n| Depth Scene Snapshot | Make a photo of the depth scene using LiDAR                                          | [code](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/snapshot_depth_scene.dart)| |\n\nIf you prefer video here is a playlist with \"AR in Flutter\" videos:\n\n[![AR in Flutter videos](https://img.youtube.com/vi/gOgCdl5_E7k/0.jpg)](https://www.youtube.com/watch?v=MaH4L6R8ZfQ\u0026list=PLjaSBcAZ8TqGoWj3FE96uQ2gGPDGaXbDp \"AR in Flutter videos\")\n\n## UX advice\nYou might want to check the device capabilities before establishing an AR session. Review the [Check Support](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/check_support_page.dart) sample for the implementation details.\n\nIf your app requires placing objects consider using coaching overlays. Review the [Custom Object](https://github.com/olexale/arkit_flutter_plugin/blob/master/example/lib/custom_object_page.dart) sample for the implementation details.\n\n## Before you go to AppStore\nThe plugin supports TrueDepth API. In case you didn't use it, your app will be rejected by Apple. Hence you need to remove any TrueDepth functionality by modifying your `Podfile` file\n```Ruby\npost_install do |installer|\n  installer.pods_project.targets.each do |target|\n    target.build_configurations.each do |config|\n      ... # Here are some configurations automatically generated by flutter\n\n      config.build_settings['OTHER_SWIFT_FLAGS'] = '$(inherited) -DDISABLE_TRUEDEPTH_API'\n    end\n  end\nend\n```\n\n## FAQ\n- **Is it possible to use this plugin on Android?**  \nNo, as ARKit is not available on Android. You might want to try [ARCore plugin](https://pub.dev/packages/arcore_flutter_plugin) instead.\n- **My app crashes when I open the AR scene several times. Why?**  \nMost probably that's because you didn't call `dispose` method on the ARKit controller.\n- **One of the features I need is merged in the repository, but is not available on pub.dev. How can I use the latest version?**  \nYou may use the latest version by changing the `pubspec.yaml` dependency to:\n```yaml\ndependencies:\n  arkit_plugin:\n    git: git://github.com/olexale/arkit_flutter_plugin.git\n```\n\n## Contributing\n\nIf you find a bug or would like to request a new feature, just [open an issue](https://github.com/olexale/arkit_flutter_plugin/issues/new). Your contributions are always welcome!\n","funding_links":[],"categories":["模板","Vision [🔝](#readme)","Templates","15. 增强现实（AR）开发"],"sub_categories":["视觉识别","视觉效果","Vision","应用内购买"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folexale%2Farkit_flutter_plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folexale%2Farkit_flutter_plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folexale%2Farkit_flutter_plugin/lists"}