├── .flutter-plugins-dependencies ├── .gitignore ├── .metadata ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── build │ │ └── sceneform_sdk │ │ │ ├── default_materials │ │ │ ├── fbx_material.sfm │ │ │ ├── gltf_material.sfm │ │ │ ├── obj_material.sfm │ │ │ └── obj_material_two_sided.sfm │ │ │ ├── linux │ │ │ ├── converter │ │ │ └── matc │ │ │ ├── mac │ │ │ ├── build_materials │ │ │ ├── converter │ │ │ └── matc │ │ │ ├── version_hash │ │ │ └── windows │ │ │ ├── converter.exe │ │ │ └── matc.exe │ ├── sampledata │ │ ├── Anubis Statue │ │ │ ├── scene.bin │ │ │ ├── scene.gltf │ │ │ ├── scene.sfa │ │ │ └── textures │ │ │ │ └── Material0_baseColor.jpeg │ │ └── Cube │ │ │ ├── scene.bin │ │ │ ├── scene.gltf │ │ │ ├── scene.sfa │ │ │ └── textures │ │ │ ├── Material_29_baseColor.jpg │ │ │ └── Material_29_metallicRoughness.png │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── assets │ │ │ ├── cubeModel.sfb │ │ │ └── statueModel.sfb │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── learn_ar_flutter │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── catModel.png ├── cubeModel.png ├── githubLogo.png ├── legoHouseModel.png └── statueModel.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── about_widget.dart ├── camera_screen.dart ├── generated_plugin_registrant.dart ├── main.dart ├── model_bloc.dart ├── model_event.dart ├── starting_page.dart └── strings.dart ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart └── web └── index.html /.flutter-plugins-dependencies: -------------------------------------------------------------------------------- 1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"url_launcher","path":"/home/akshansh2000/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.1/","dependencies":[]}],"android":[{"name":"arcore_flutter_plugin","path":"/home/akshansh2000/flutter/.pub-cache/hosted/pub.dartlang.org/arcore_flutter_plugin-0.0.5+1/","dependencies":[]},{"name":"url_launcher","path":"/home/akshansh2000/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.4.1/","dependencies":[]}],"macos":[{"name":"url_launcher_macos","path":"/home/akshansh2000/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_macos-0.0.1+2/","dependencies":[]}],"linux":[],"windows":[],"web":[{"name":"url_launcher_web","path":"/home/akshansh2000/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher_web-0.1.0+2/","dependencies":[]}]},"dependencyGraph":[{"name":"arcore_flutter_plugin","dependencies":[]},{"name":"url_launcher","dependencies":["url_launcher_web","url_launcher_macos"]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]}],"date_created":"2020-10-14 13:13:13.683481","version":"1.22.1"} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/Flutter/flutter_export_environment.sh 65 | **/ios/ServiceDefinitions.json 66 | **/ios/Runner/GeneratedPluginRegistrant.* 67 | 68 | # Exceptions to above rules. 69 | !**/ios/**/default.mode1v3 70 | !**/ios/**/default.mode2v3 71 | !**/ios/**/default.pbxuser 72 | !**/ios/**/default.perspectivev3 73 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 74 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 68587a0916366e9512a78df22c44163d041dd5f3 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | For any queries / general discussion, join the [Slack](https://slack.com/intl/en-in/) channel below: 2 | 3 | [![slack/learnarf](https://img.shields.io/badge/slack-@learnarf-green.svg?logo=slack)](https://join.slack.com/t/learnarf/shared_invite/enQtODYyMjAzMjY3MjU0LWM4YjRlNDlkNDM2ZGZkY2MzMzk5OTQ5ZmVhYmQzZmYyMTU5MGE2MTk4ZWMwZGQ1MDg4MmZjNjlkNzAwNTg0OTk) 4 | 5 | # Contributor Guidelines 6 | 7 | After creating a fork of the current repository, you are all set to contribute towards the development of this app. 8 | 9 | To build your project, run these 3 commands in the command line **(bash/fish/git bash)**: 10 | ```bash 11 | git clone https://github.com/[YOUR USERNAME]/learn_ar_flutter.git 12 | cd learn_ar_flutter/ 13 | flutter run 14 | ``` 15 | 16 | These commands will clone your forked repository, navigate into the project directory, and execute a Flutter build command, respectively. 17 | 18 | ## Prerequisites 19 | 20 | * Make sure to have Flutter installed and in your path. Refer to [this](https://flutter.dev/docs/get-started/install) link to get help getting started. 21 | 22 | * Also, make sure to have your mobile device connected / an emulator up and running before executing the build command. 23 | 24 | * As this project uses the *Sceneform SDK*, it is also important to have [Android Studio](https://developer.android.com/studio) installed to be able to add 3D models to the app. *However, if you do not want to add any 3D models, you can simply skip this step*. 25 | 26 | ## Making commits 27 | 28 | Make sure to have your commits in a separate branch from master. To switch to a new git branch, type: 29 | ```bash 30 | git checkout -b [BRANCH NAME] 31 | ``` 32 | 33 | ## Making a Pull Request 34 | 35 | * Add relevant images / screenshots of the output of your work, if possible. 36 | 37 | * If your PR solves an issue, make sure to write `Fixes #[ISSUE NUMBER]` in the description. 38 | 39 | * If your PR partially solves an issue / is a part of some issue, make sure to write `Part of #[ISSUE NUMBER]` in the description. 40 | 41 | * In case you are adding a feature of which an issue doesn't yet exist, make sure to open a [new issue](https://github.com/akshansh2000/learn_ar_flutter/issues/new) regarding the same before proceeding. 42 | 43 | ## Opening Issues 44 | 45 | There are no specific rules for opening issues, however, add relevant images/screenshots of the issue, if possible. 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Akshansh Bhanjana 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # learn_ar_flutter 2 | 3 | **LearnARF** is a [Flutter](https://flutter.dev/) application which uses Google's [ARCore](https://developers.google.com/ar) to spawn 3D models into the real world. Additionally, it uses the [Sceneform SDK](https://github.com/google-ar/sceneform-android-sdk) to make it easier to handle 3D models. 4 | 5 | ## Prerequisites 6 | 7 | * To be able to run this app, make sure your phone has official support for Google's ARCore. Check [this](https://developers.google.com/ar/discover/supported-devices) list to find out. 8 | 9 | * Make sure to have the **Flutter Framework** installed. You can install it by visiting their [official site](https://flutter.dev/docs/get-started/install). 10 | 11 | * Make sure to have [git](https://git-scm.com/) installed. 12 | 13 | ## How To 14 | 15 | ### Testing 16 | 17 | If you only want to test the app and not contribute towards the development, you can simply clone the current repository and build the app. 18 | 19 | To clone the current repository, run **(in bash/fish/git bash)**: 20 | ```bash 21 | git clone https://github.com/akshansh2000/learn_ar_flutter.git 22 | ``` 23 | 24 | Then, navigate to the project directory and build the app. Make sure to connect your mobile device / open an emulator before executing this step. 25 | ```bash 26 | cd learn_ar_flutter/ 27 | flutter run 28 | ``` 29 | 30 | **Note**: Make sure to have the Flutter tool [in your path](https://flutter.dev/docs/get-started/install/linux#update-your-path) before executing the above. Alternatively, if on Windows, you could use the included **Flutter Console**. 31 | 32 | ### Contributing 33 | 34 | If you want to contribute towards the development of the app, you are more than welcome. To do so, make sure to [create a fork](https://github.com/akshansh2000/learn_ar_flutter/fork) of the current repository. 35 | 36 | Also, make sure to go through the [Contributor Guidelines](https://github.com/akshansh2000/learn_ar_flutter/blob/master/CONTRIBUTING.md). 37 | 38 | ## Using the app 39 | 40 | The app has a simple UI now, subject to change during the next couple weeks. 41 | 42 | Here is how to add 3D models to the real world: 43 | 44 | | # | To - Do | Demonstration | 45 | | --- | --------------------------------------------------------- | -------------------------------------------------------------------- | 46 | | 1 | Select a model to add (tap on the icon of the model) | | 47 | | 2 | Press `START` | | 48 | | 3 | Wait for the app to detect a plane | | 49 | | 4 | Tap the part of the plane where you want to add the model | | 50 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | apply plugin: 'com.google.ar.sceneform.plugin' 28 | 29 | android { 30 | compileSdkVersion 29 31 | 32 | compileOptions { 33 | sourceCompatibility 1.8 34 | targetCompatibility 1.8 35 | } 36 | 37 | sourceSets { 38 | main.java.srcDirs += 'src/main/kotlin' 39 | } 40 | 41 | lintOptions { 42 | disable 'InvalidPackage' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.example.learn_ar_flutter" 48 | minSdkVersion 24 49 | targetSdkVersion 29 50 | versionCode flutterVersionCode.toInteger() 51 | versionName flutterVersionName 52 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 53 | } 54 | 55 | buildTypes { 56 | release { 57 | // TODO: Add your own signing config for the release build. 58 | // Signing with the debug keys for now, so `flutter run --release` works. 59 | signingConfig signingConfigs.debug 60 | } 61 | } 62 | } 63 | 64 | flutter { 65 | source '../..' 66 | } 67 | 68 | dependencies { 69 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 70 | testImplementation 'junit:junit:4.12' 71 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 72 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 73 | implementation 'com.google.ar.sceneform.ux:sceneform-ux:1.13.0' 74 | implementation 'com.google.ar.sceneform:core:1.13.0' 75 | implementation 'com.google.ar:core:1.13.0' 76 | } 77 | 78 | 79 | sceneform.asset('sampledata/Cube/scene.gltf', 80 | 'default', 81 | 'sampledata/Cube/scene.sfa', 82 | 'src/main/assets/cubeModel') 83 | 84 | 85 | sceneform.asset('sampledata/Anubis Statue/scene.gltf', 86 | 'default', 87 | 'sampledata/Anubis Statue/scene.sfa', 88 | 'src/main/assets/statueModel') -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/default_materials/fbx_material.sfm: -------------------------------------------------------------------------------- 1 | { 2 | local is_pbr = sfm.hasSourceProperty("metallic") && 3 | sfm.hasSourceProperty("roughness") && 4 | sfm.hasSourceProperty("base_color") && 5 | sfm.hasSourceProperty("emissive"), 6 | local propUseOpacityMap = sfm.sourceProperty("use_opacity_map", 0.0), 7 | local kWhite4 = [1.0, 1.0, 1.0, 1.0], 8 | local kWhite3 = [1.0, 1.0, 1.0], 9 | local kBlack = [0.0, 0.0, 0.0, 1.0], 10 | material: { 11 | name: "FBX Material", 12 | parameters: [ 13 | { 14 | name: "baseColor", 15 | description: "Base Color", 16 | options: [ 17 | { 18 | default: sfm.sourceProperty("base_color", kWhite3) + [1], 19 | valid_if: is_pbr, 20 | }, { 21 | default: sfm.sourceProperty("DiffuseColor", kWhite3) + [1], 22 | }, 23 | ] 24 | }, 25 | { 26 | name: "baseColorMap", 27 | description: "Base Color Map", 28 | options: [ 29 | { 30 | usage: "BaseColor", 31 | default: sfm.sourceTexture("BaseColor"), 32 | valid_if: sfm.hasSourceTexture("BaseColor"), 33 | requires: ["uv0"], 34 | fragment: ||| 35 | vec4 baseColorMapValue = texture(materialParams_baseColorMap, getUV0()); 36 | ||| 37 | }, { 38 | default: null, 39 | fragment: ||| 40 | vec4 baseColorMapValue = vec4(1.0, 1.0, 1.0, 1.0); 41 | ||| 42 | }, 43 | ] 44 | }, 45 | { 46 | name: "normalMap", 47 | description: "Optional per-pixel normal mapping", 48 | options: [ 49 | { 50 | usage: "Normal", 51 | default: sfm.sourceTexture("Normal"), 52 | valid_if: sfm.hasSourceTexture("Normal"), 53 | requires: ["uv0", "tangents"], 54 | fragment: ||| 55 | vec3 tangentNormal = texture(materialParams_normalMap, getUV0()).xyz; 56 | tangentNormal = normalize(tangentNormal*2.0 - 1.0); 57 | material.normal = tangentNormal; 58 | ||| 59 | }, { 60 | default: null, 61 | fragment: ||| 62 | material.normal = vec3(0, 0, 1); 63 | ||| 64 | } 65 | ] 66 | }, 67 | { 68 | name: "interpolatedColor", 69 | description: "Interpolated Color", 70 | options: [ 71 | { 72 | default: null, 73 | fragment: ||| 74 | vec4 interpolatedColor = %s; 75 | ||| % [sfm.lerpColor()] 76 | }, 77 | ] 78 | }, 79 | { 80 | name: "metallic", 81 | description: "Metalicity", 82 | options: [ 83 | { 84 | default: sfm.sourceProperty("metallic", 0.0), 85 | } 86 | ] 87 | }, 88 | { 89 | name: "metallicMap", 90 | description: "Metallic Map", 91 | options: [ 92 | { 93 | usage: "Metallic", 94 | default: sfm.sourceTexture("Metallic"), 95 | valid_if: sfm.hasSourceTexture("Metallic"), 96 | requires: ["uv0"], 97 | fragment: ||| 98 | float metallicMapValue = texture(materialParams_metallicMap, getUV0()).r; 99 | ||| 100 | }, { 101 | default: null, 102 | fragment: ||| 103 | float metallicMapValue = 1.0; 104 | ||| 105 | }, 106 | ] 107 | }, 108 | { 109 | name: "roughness", 110 | description: "Roughness", 111 | options: [ 112 | { 113 | default: sfm.sourceProperty("roughness", 1.0), 114 | } 115 | ] 116 | }, 117 | { 118 | name: "roughnessMap", 119 | description: "Roughness Map", 120 | options: [ 121 | { 122 | usage: "Roughness", 123 | default: sfm.sourceTexture("Roughness"), 124 | valid_if: sfm.hasSourceTexture("Roughness"), 125 | requires: ["uv0"], 126 | fragment: ||| 127 | float roughnessMapValue = texture(materialParams_roughnessMap, getUV0()).r; 128 | ||| 129 | }, { 130 | default: null, 131 | fragment: ||| 132 | float roughnessMapValue = 1.0; 133 | ||| 134 | }, 135 | ] 136 | }, 137 | { 138 | name: "opacity", 139 | description: "Conditionally enabled transparency", 140 | options: [ 141 | { 142 | default: null, 143 | valid_if: propUseOpacityMap != 1.0, 144 | blending: "opaque", 145 | fragment: "" 146 | }, { 147 | default: null, 148 | valid_if: propUseOpacityMap == 1.0, 149 | blending: "transparent", 150 | fragment: "" 151 | } 152 | ] 153 | } 154 | ], 155 | requires: [ 156 | "position", 157 | ], 158 | shadingModel: "lit", 159 | }, 160 | 161 | fragment: ||| 162 | void material(inout MaterialInputs material) { 163 | %(normalMap_code)s 164 | prepareMaterial(material); 165 | 166 | %(baseColorMap_code)s 167 | %(metallicMap_code)s 168 | %(roughnessMap_code)s 169 | %(interpolatedColor_code)s 170 | 171 | material.baseColor = materialParams.baseColor * baseColorMapValue * 172 | interpolatedColor; 173 | material.metallic = materialParams.metallic * metallicMapValue; 174 | material.roughness = materialParams.roughness * roughnessMapValue; 175 | %(opacity_code)s 176 | } 177 | |||, 178 | } 179 | -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/default_materials/gltf_material.sfm: -------------------------------------------------------------------------------- 1 | { 2 | local usesSpecularGlossinessExtension = sfm.sourceProperty("UsesSpecularGlossiness", false), 3 | local hasPackedMetallicRoughness = !usesSpecularGlossinessExtension && sfm.hasSourceTexture("Roughness") && sfm.sourceTexture("Roughness") == sfm.sourceTexture("Metallic"), 4 | local hasPackedOcclusionMetallicRoughness = hasPackedMetallicRoughness && sfm.hasSourceTexture("Occlusion") && sfm.sourceTexture("Occlusion") == sfm.sourceTexture("Roughness"), 5 | local alphaMode = sfm.sourceProperty("AlphaMode", "OPAQUE"), 6 | local shadingModel = if sfm.sourceProperty("ShadingModel", "Pbr") == "Pbr" then "lit" else "unlit", 7 | 8 | material: { 9 | name: "Gltf 2 Metallic-Roughness Material", 10 | parameters: [ 11 | { 12 | name: "baseColorFactor", 13 | description: "Base Color Factor", 14 | options: [ 15 | { 16 | valid_if: !usesSpecularGlossinessExtension, 17 | default: sfm.sourceProperty("BaseColor", [1.0, 1.0, 1.0, 1.0]), 18 | }, 19 | { 20 | }, 21 | ] 22 | }, 23 | { 24 | name: "baseColor", 25 | description: "Base Color Texture", 26 | options: [ 27 | { 28 | default: sfm.sourceTexture("BaseColor"), 29 | valid_if: sfm.hasSourceTexture("BaseColor") && !usesSpecularGlossinessExtension, 30 | requires: ["uv0"], 31 | fragment: ||| 32 | material.baseColor = %(lerpColor)s * materialParams.baseColorFactor * texture(materialParams_baseColor, getUV0()); 33 | %(untonemap)s 34 | ||| % { 35 | lerpColor: sfm.lerpColor(), 36 | untonemap: if shadingModel == "unlit" then "material.baseColor.xyz = inverseTonemap(material.baseColor.xyz);" else "", 37 | } 38 | }, 39 | { 40 | default: null, 41 | valid_if: !usesSpecularGlossinessExtension, 42 | fragment: ||| 43 | material.baseColor = %(lerpColor)s * materialParams.baseColorFactor; 44 | ||| % { lerpColor: sfm.lerpColor() } 45 | }, 46 | { 47 | }, 48 | ] 49 | }, 50 | { 51 | name: "diffuseColorFactor", 52 | description: "Diffuse Color Factor", 53 | options: [ 54 | { 55 | valid_if: usesSpecularGlossinessExtension, 56 | default: sfm.sourceProperty("DiffuseColor", [1.0, 1.0, 1.0, 1.0]), 57 | }, 58 | { 59 | }, 60 | ] 61 | }, 62 | { 63 | name: "diffuseColor", 64 | description: "Diffuse Color Texture", 65 | options: [ 66 | { 67 | default: sfm.sourceTexture("DiffuseColor"), 68 | valid_if: sfm.hasSourceTexture("DiffuseColor") && usesSpecularGlossinessExtension, 69 | requires: ["uv0"], 70 | fragment: ||| 71 | vec4 diffuseColor = %(lerpColor)s * materialParams.diffuseColorFactor * texture(materialParams_diffuseColor, getUV0()); 72 | ||| % { lerpColor: sfm.lerpColor() } 73 | }, 74 | { 75 | default: null, 76 | valid_if: usesSpecularGlossinessExtension, 77 | fragment: ||| 78 | vec4 diffuseColor = %(lerpColor)s * materialParams.diffuseColorFactor; 79 | ||| % { lerpColor: sfm.lerpColor() } 80 | }, 81 | { 82 | }, 83 | ] 84 | }, 85 | { 86 | name: "normal", 87 | description: "Normal Texture", 88 | options: [ 89 | { 90 | usage: "Normal", 91 | default: sfm.sourceTexture("Normal"), 92 | valid_if: sfm.hasSourceTexture("Normal"), 93 | requires: ["uv0"], 94 | fragment: ||| 95 | vec3 normal = normalize(texture(materialParams_normal, getUV0()).xyz * 2.0 - 1.0); 96 | ||| 97 | }, { 98 | default: null, 99 | fragment: ||| 100 | vec3 normal = vec3(0.0, 0.0, 1.0); 101 | ||| 102 | }, 103 | ] 104 | }, 105 | { 106 | name: "metallicFactor", 107 | description: "Metallic Factor", 108 | options: [ 109 | { 110 | valid_if: !usesSpecularGlossinessExtension, 111 | default: sfm.sourceProperty("Metallic", 1.0), 112 | }, 113 | { 114 | }, 115 | ] 116 | }, 117 | { 118 | name: "roughnessFactor", 119 | description: "Roughness Factor", 120 | options: [ 121 | { 122 | valid_if: !usesSpecularGlossinessExtension, 123 | default: sfm.sourceProperty("Roughness", 1.0), 124 | }, 125 | { 126 | }, 127 | ] 128 | }, 129 | { 130 | name: "specularFactor", 131 | description: "Specular Factor", 132 | options: [ 133 | { 134 | valid_if: usesSpecularGlossinessExtension, 135 | default: sfm.sourceProperty("SpecularColor", [1.0, 1.0, 1.0])[:3], 136 | }, 137 | { 138 | }, 139 | ], 140 | }, 141 | { 142 | name: "glossinessFactor", 143 | description: "Glossiness Factor", 144 | options: [ 145 | { 146 | valid_if: usesSpecularGlossinessExtension, 147 | default: sfm.sourceProperty("Glossiness", 1.0), 148 | }, 149 | { 150 | }, 151 | ], 152 | }, 153 | { 154 | name: "specularGlossiness", 155 | description: "Packed Specular + Glossiness Texture", 156 | options: [ 157 | { 158 | valid_if: usesSpecularGlossinessExtension && sfm.hasSourceTexture("Specular"), 159 | default: sfm.sourceTexture("Specular"), 160 | requires: ["uv0"], 161 | }, 162 | { 163 | }, 164 | ], 165 | }, 166 | { 167 | name: "specularGlossinessCalculation", 168 | description: "Computation to support the KHR_materials_pbrSpecularGlossiness extension", 169 | options: [ 170 | { 171 | valid_if: usesSpecularGlossinessExtension && sfm.hasSourceTexture("Specular"), 172 | fragment: ||| 173 | const vec3 intensityConversion = vec3(0.299, 0.587, 0.114); 174 | const float dielectricSpecular = 0.04; 175 | const float epsilon = 1e-4; 176 | 177 | vec3 diffuse = diffuseColor.xyz; 178 | vec4 specularGlossinessSample = texture(materialParams_specularGlossiness, getUV0()); 179 | vec3 specular = materialParams.specularFactor * specularGlossinessSample.xyz; 180 | float glossiness = materialParams.glossinessFactor * specularGlossinessSample.w; 181 | float oneMinusSpecularStrength = 1.0 - max(max(specular.x, specular.y), specular.z); 182 | float diffuseBrightness = max(sqrt(dot(diffuse * diffuse, intensityConversion)), epsilon); 183 | float specularBrightness = max(sqrt(dot(specular * specular, intensityConversion)), epsilon); 184 | float metallic; 185 | if (specularBrightness < dielectricSpecular) { 186 | metallic = 0.0; 187 | } else { 188 | float a = dielectricSpecular; 189 | float b = diffuseBrightness * oneMinusSpecularStrength / (1.0 - dielectricSpecular) + specularBrightness - 2.0 * dielectricSpecular; 190 | float c = dielectricSpecular - specularBrightness; 191 | float D = max(b * b - 4.0 * a * c, epsilon); 192 | metallic = clamp((-b + sqrt(D)) / (2.0 * a), 0.0, 1.0); 193 | } 194 | vec3 baseColorFromDiffuse = diffuse * (oneMinusSpecularStrength / (1.0 - dielectricSpecular) / max(1.0 - metallic, epsilon)); 195 | vec3 baseColorFromSpecular = (specular - vec3(dielectricSpecular * (1.0 - metallic))) * (1.0 / max(metallic, epsilon)); 196 | vec3 baseColor = clamp(mix(baseColorFromDiffuse, baseColorFromSpecular, metallic * metallic), vec3(0.0), vec3(1.0)); 197 | 198 | material.baseColor = vec4(baseColor, diffuseColor.w); 199 | material.metallic = metallic; 200 | material.roughness = 1.0 - glossiness; 201 | |||, 202 | }, 203 | { 204 | }, 205 | ], 206 | }, 207 | { 208 | name: "metallicRoughness", 209 | description: "Packed (Occlusion) + Metallic + Roughness Texture", 210 | options: [ 211 | { 212 | default: sfm.sourceTexture("Metallic"), 213 | valid_if: hasPackedMetallicRoughness && shadingModel == "lit" && !usesSpecularGlossinessExtension, 214 | fragment: ||| 215 | vec3 metallicRoughnessSample = texture(materialParams_metallicRoughness, getUV0()).xyz; 216 | material.metallic = materialParams.metallicFactor * metallicRoughnessSample.b; 217 | material.roughness = materialParams.roughnessFactor * metallicRoughnessSample.g; 218 | ||| 219 | }, 220 | { 221 | default: null, 222 | valid_if: shadingModel == "lit" && !usesSpecularGlossinessExtension, 223 | fragment: ||| 224 | material.metallic = materialParams.metallicFactor; 225 | material.roughness = materialParams.roughnessFactor; 226 | ||| 227 | }, 228 | { 229 | }, 230 | ], 231 | }, 232 | { 233 | name: "occlusion", 234 | description: "Occlusion Texture", 235 | options: [ 236 | { 237 | valid_if: shadingModel == "unlit", 238 | }, 239 | { 240 | default: sfm.sourceTexture("Occlusion"), 241 | valid_if: sfm.hasSourceTexture("Occlusion") && !hasPackedOcclusionMetallicRoughness, 242 | requires: ["uv0"], 243 | fragment: ||| 244 | material.ambientOcclusion = texture(materialParams_occlusion, getUV0()).x; 245 | ||| 246 | }, 247 | { 248 | default: null, 249 | valid_if: hasPackedOcclusionMetallicRoughness, 250 | requires: ["uv0"], 251 | fragment: "material.ambientOcclusion = metallicRoughnessSample.x;", 252 | }, 253 | { 254 | fragment: "material.ambientOcclusion = 1.0;", 255 | }, 256 | ], 257 | }, 258 | { 259 | name: "emissiveFactor", 260 | description: "Emissive Factor", 261 | options: [ 262 | { 263 | default: sfm.sourceProperty("EmissiveColor", [0.0, 0.0, 0.0, 0.0]), 264 | }, 265 | ] 266 | }, 267 | { 268 | name: "emissive", 269 | description: "Emissive Texture", 270 | options: [ 271 | { 272 | default: sfm.sourceTexture("Emissive"), 273 | valid_if: sfm.hasSourceTexture("Emissive"), 274 | requires: ["uv0"], 275 | fragment: ||| 276 | material.emissive = materialParams.emissiveFactor * texture(materialParams_emissive, getUV0()); 277 | ||| 278 | }, 279 | { 280 | valid_if: shadingModel == "lit", 281 | fragment: "material.emissive = materialParams.emissiveFactor;", 282 | }, 283 | { 284 | } 285 | ] 286 | }, 287 | { 288 | name: "opacity", 289 | description: "Conditionally enabled transparency", 290 | options: [ 291 | { 292 | default: null, 293 | valid_if: alphaMode == "BLEND", 294 | blending: "transparent", 295 | maskThreshold: 0.5, 296 | fragment: "", 297 | }, 298 | { 299 | default: null, 300 | valid_if: alphaMode == "MASK", 301 | blending: "masked", 302 | maskThreshold: sfm.sourceProperty("AlphaCutoff", 0.5), 303 | fragment: "", 304 | }, 305 | { 306 | default: null, 307 | valid_if: alphaMode == "OPAQUE", 308 | blending: "opaque", 309 | maskThreshold: 0.5, 310 | fragment: "", 311 | }, 312 | ] 313 | }, 314 | ], 315 | requires: [ 316 | "position", 317 | "tangents", 318 | "uv0" 319 | ], 320 | doubleSided: sfm.sourceProperty("DoubleSided", false), 321 | shadingModel: shadingModel, 322 | }, 323 | 324 | fragment: ||| 325 | void material(inout MaterialInputs material) { 326 | %(normal_code)s 327 | material.normal = normal; 328 | 329 | prepareMaterial(material); 330 | 331 | %(baseColor_code)s 332 | %(diffuseColor_code)s 333 | %(metallicRoughness_code)s 334 | %(specularGlossinessCalculation_code)s 335 | %(occlusion_code)s 336 | %(emissive_code)s 337 | %(opacity_code)s 338 | } 339 | |||, 340 | } 341 | -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/default_materials/obj_material.sfm: -------------------------------------------------------------------------------- 1 | { 2 | material: { 3 | local kWhite = [1.0, 1.0, 1.0, 1.0], 4 | local kBlack = [0.0, 0.0, 0.0, 1.0], 5 | local propDiffuse = sfm.sourceProperty("DiffuseColor", kWhite), 6 | local propSpecular = sfm.sourceProperty("SpecularColor", kBlack), 7 | local propShadingModel = sfm.sourceProperty("ShadingModel", "Gouraud"), 8 | local propShininess = sfm.sourceProperty("Shininess", 1.0), 9 | local propOpacity = sfm.sourceProperty("Opacity", 1.0), 10 | name: "OBJ Material", 11 | parameters: [ 12 | { 13 | name: "baseColor", 14 | description: "Base Color", 15 | options: [ 16 | { 17 | usage: "BaseColor", 18 | default: sfm.sourceTexture("BaseColor"), 19 | valid_if: sfm.hasSourceTexture("BaseColor"), 20 | requires: ["uv0"], 21 | fragment: ||| 22 | vec4 baseColorParam = %(lerpColor)s * 23 | texture(materialParams_baseColor, getUV0()); 24 | ||| % { lerpColor: sfm.lerpColor() } 25 | }, { 26 | default: null, 27 | fragment: ||| 28 | vec4 baseColorParam = %(lerpColor)s; 29 | ||| % { lerpColor: sfm.lerpColor() } 30 | }, 31 | ] 32 | }, 33 | { 34 | name: "baseColorTint", 35 | description: "Base Color Tint", 36 | options: [ 37 | { 38 | default: propDiffuse, 39 | valid_if: !(propDiffuse == kBlack), 40 | }, 41 | { 42 | default: kWhite, 43 | valid_if: propDiffuse == kBlack, 44 | }, 45 | ] 46 | }, 47 | { 48 | name: "metallic", 49 | description: "Metalicity", 50 | options: [ 51 | { 52 | default: 1.0, 53 | valid_if: !sfm.isGrayscale(propSpecular) && 54 | propShadingModel=="Phong", 55 | }, { 56 | default: 0.0 57 | } 58 | ] 59 | }, 60 | { 61 | name: "roughness", 62 | description: "Roughness", 63 | options: [ 64 | { 65 | default: std.sqrt(2.0 / (2.0 + propShininess)), 66 | valid_if: propShadingModel=="Phong" 67 | }, { 68 | default: 1.0, 69 | valid_if: propShadingModel!="Phong" 70 | } 71 | ] 72 | }, 73 | { 74 | name: "opacity", 75 | description: "Conditionally enabled transparency", 76 | options: [ 77 | { 78 | default: null, 79 | valid_if: propOpacity >= 1.0 || propOpacity == 0.0, 80 | blending: "opaque", 81 | fragment: "" 82 | }, { 83 | default: propOpacity, 84 | valid_if: propOpacity < 1.0 && propOpacity != 0.0, 85 | blending: "transparent", 86 | fragment: ||| 87 | material.baseColor = material.baseColor * materialParams.opacity; 88 | ||| 89 | }, { 90 | default: 1.0, 91 | blending: "transparent", 92 | fragment: ||| 93 | material.baseColor = material.baseColor * materialParams.opacity; 94 | ||| 95 | } 96 | ] 97 | } 98 | ], 99 | requires: [ 100 | "position", 101 | ], 102 | shadingModel: "lit", 103 | }, 104 | 105 | fragment: ||| 106 | void material(inout MaterialInputs material) { 107 | prepareMaterial(material); 108 | 109 | %(baseColor_code)s 110 | 111 | material.baseColor = materialParams.baseColorTint * 112 | baseColorParam; 113 | material.metallic = materialParams.metallic; 114 | material.roughness = materialParams.roughness; 115 | 116 | %(opacity_code)s 117 | } 118 | |||, 119 | } 120 | -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/default_materials/obj_material_two_sided.sfm: -------------------------------------------------------------------------------- 1 | { 2 | material: { 3 | local kWhite = [1.0, 1.0, 1.0, 1.0], 4 | local kBlack = [0.0, 0.0, 0.0, 1.0], 5 | local propDiffuse = sfm.sourceProperty("DiffuseColor", kWhite), 6 | local propSpecular = sfm.sourceProperty("SpecularColor", kBlack), 7 | local propShadingModel = sfm.sourceProperty("ShadingModel", "Gouraud"), 8 | local propShininess = sfm.sourceProperty("Shininess", 1.0), 9 | local propOpacity = sfm.sourceProperty("Opacity", 1.0), 10 | name: "FBX Material", 11 | parameters: [ 12 | { 13 | name: "baseColor", 14 | description: "Base Color", 15 | options: [ 16 | { 17 | usage: "BaseColor", 18 | default: sfm.sourceTexture("BaseColor"), 19 | valid_if: sfm.hasSourceTexture("BaseColor"), 20 | requires: ["uv0"], 21 | fragment: ||| 22 | vec4 baseColorParam = %(lerpColor)s * 23 | texture(materialParams_baseColor, getUV0()); 24 | ||| % { lerpColor: sfm.lerpColor() } 25 | }, { 26 | default: null, 27 | fragment: ||| 28 | vec4 baseColorParam = %(lerpColor)s; 29 | ||| % { lerpColor: sfm.lerpColor() } 30 | }, 31 | ] 32 | }, 33 | { 34 | name: "baseColorTint", 35 | description: "Base Color Tint", 36 | options: [ 37 | { 38 | default: propDiffuse, 39 | valid_if: !(propDiffuse == kBlack), 40 | }, 41 | { 42 | default: kWhite, 43 | valid_if: propDiffuse == kBlack, 44 | }, 45 | ] 46 | }, 47 | { 48 | name: "metallic", 49 | description: "Metalicity", 50 | options: [ 51 | { 52 | default: 1.0, 53 | valid_if: !sfm.isGrayscale(propSpecular) && 54 | propShadingModel=="Phong", 55 | }, { 56 | default: 0.0 57 | } 58 | ] 59 | }, 60 | { 61 | name: "roughness", 62 | description: "Roughness", 63 | options: [ 64 | { 65 | default: std.sqrt(2.0 / (2.0 + propShininess)), 66 | valid_if: propShadingModel=="Phong" 67 | }, { 68 | default: 1.0, 69 | valid_if: propShadingModel=="Gouraud" 70 | } 71 | ] 72 | }, 73 | { 74 | name: "opacity", 75 | description: "Conditionally enabled transparency", 76 | options: [ 77 | { 78 | default: null, 79 | valid_if: propOpacity >= 1.0 || propOpacity == 0.0, 80 | blending: "opaque", 81 | fragment: "" 82 | }, { 83 | default: propOpacity, 84 | valid_if: propOpacity < 1.0 && propOpacity != 0.0, 85 | blending: "transparent", 86 | fragment: ||| 87 | material.baseColor = material.baseColor * materialParams.opacity; 88 | ||| 89 | } 90 | ] 91 | } 92 | ], 93 | requires: [ 94 | "position", 95 | ], 96 | shadingModel: "lit", 97 | culling: "none", 98 | }, 99 | 100 | fragment: ||| 101 | void material(inout MaterialInputs material) { 102 | prepareMaterial(material); 103 | 104 | %(baseColor_code)s 105 | 106 | material.baseColor = materialParams.baseColorTint * 107 | baseColorParam; 108 | material.metallic = materialParams.metallic; 109 | material.roughness = materialParams.roughness; 110 | 111 | %(opacity_code)s 112 | } 113 | |||, 114 | } 115 | -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/linux/converter: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/build/sceneform_sdk/linux/converter -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/linux/matc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/build/sceneform_sdk/linux/matc -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/mac/build_materials: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BIN_DIR=$(dirname $0) 4 | 5 | for material in $(find . -name "*.mat"); do 6 | dir=$(dirname "$material") 7 | name=$(basename "$material" .mat) 8 | # Try to find compiled file 9 | compiled=$(find . -not -path "*build/intermediate*" -and -name "$name.compiled_mat") 10 | if [[ $(echo "$compiled" | wc -l) -gt 1 ]]; then 11 | echo "ERROR: Found multiple compiled materials for $material" 12 | continue 13 | elif [[ -z $compiled ]]; then 14 | compiled="$dir/$name.compiled_mat" 15 | fi 16 | echo Compiling $name.mat to $compiled... 17 | "$BIN_DIR/matc" --optimize --platform=mobile --output="$compiled" "$material" 18 | done 19 | -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/mac/converter: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/build/sceneform_sdk/mac/converter -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/mac/matc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/build/sceneform_sdk/mac/matc -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/version_hash: -------------------------------------------------------------------------------- 1 | -669065350 -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/windows/converter.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/build/sceneform_sdk/windows/converter.exe -------------------------------------------------------------------------------- /android/app/build/sceneform_sdk/windows/matc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/build/sceneform_sdk/windows/matc.exe -------------------------------------------------------------------------------- /android/app/sampledata/Anubis Statue/scene.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/sampledata/Anubis Statue/scene.bin -------------------------------------------------------------------------------- /android/app/sampledata/Anubis Statue/scene.gltf: -------------------------------------------------------------------------------- 1 | { 2 | "accessors": [ 3 | { 4 | "bufferView": 2, 5 | "componentType": 5126, 6 | "count": 41478, 7 | "max": [ 8 | 246.13442993164062, 9 | 593.1290283203125, 10 | 280.40487670898438 11 | ], 12 | "min": [ 13 | -238.80375671386719, 14 | -406.87094116210938, 15 | -235.78950500488281 16 | ], 17 | "type": "VEC3" 18 | }, 19 | { 20 | "bufferView": 2, 21 | "byteOffset": 497736, 22 | "componentType": 5126, 23 | "count": 41478, 24 | "max": [ 25 | 0.99996823072433472, 26 | 0.99999040365219116, 27 | 0.99988043308258057 28 | ], 29 | "min": [ 30 | -0.99995523691177368, 31 | -0.99966388940811157, 32 | -0.99996763467788696 33 | ], 34 | "type": "VEC3" 35 | }, 36 | { 37 | "bufferView": 3, 38 | "componentType": 5126, 39 | "count": 41478, 40 | "max": [ 41 | 0.99999547004699707, 42 | 0.99999833106994629, 43 | 0.99999833106994629, 44 | 1 45 | ], 46 | "min": [ 47 | -0.99999845027923584, 48 | -0.99841952323913574, 49 | -0.99997037649154663, 50 | -1 51 | ], 52 | "type": "VEC4" 53 | }, 54 | { 55 | "bufferView": 1, 56 | "componentType": 5126, 57 | "count": 41478, 58 | "max": [ 59 | 0.99942499399185181, 60 | 0.99939650297164917 61 | ], 62 | "min": [ 63 | 0.00065967411501333117, 64 | 0.00059068202972412109 65 | ], 66 | "type": "VEC2" 67 | }, 68 | { 69 | "bufferView": 0, 70 | "componentType": 5125, 71 | "count": 137022, 72 | "max": [ 73 | 41477 74 | ], 75 | "min": [ 76 | 0 77 | ], 78 | "type": "SCALAR" 79 | } 80 | ], 81 | "asset": { 82 | "extras": { 83 | "author": "riccardogiorato (https://sketchfab.com/riccardogiorato)", 84 | "license": "CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)", 85 | "source": "https://sketchfab.com/3d-models/anubis-statue-b68da033e5da46408a1b58ccdc973435", 86 | "title": "Anubis Statue" 87 | }, 88 | "generator": "Sketchfab-5.43.0", 89 | "version": "2.0" 90 | }, 91 | "bufferViews": [ 92 | { 93 | "buffer": 0, 94 | "byteLength": 548088, 95 | "byteOffset": 0, 96 | "name": "floatBufferViews", 97 | "target": 34963 98 | }, 99 | { 100 | "buffer": 0, 101 | "byteLength": 331824, 102 | "byteOffset": 548088, 103 | "byteStride": 8, 104 | "name": "floatBufferViews", 105 | "target": 34962 106 | }, 107 | { 108 | "buffer": 0, 109 | "byteLength": 995472, 110 | "byteOffset": 879912, 111 | "byteStride": 12, 112 | "name": "floatBufferViews", 113 | "target": 34962 114 | }, 115 | { 116 | "buffer": 0, 117 | "byteLength": 663648, 118 | "byteOffset": 1875384, 119 | "byteStride": 16, 120 | "name": "floatBufferViews", 121 | "target": 34962 122 | } 123 | ], 124 | "buffers": [ 125 | { 126 | "byteLength": 2539032, 127 | "uri": "scene.bin" 128 | } 129 | ], 130 | "extensionsUsed": [ 131 | "KHR_materials_unlit" 132 | ], 133 | "images": [ 134 | { 135 | "uri": "textures/Material0_baseColor.jpeg" 136 | } 137 | ], 138 | "materials": [ 139 | { 140 | "doubleSided": true, 141 | "emissiveFactor": [ 142 | 0, 143 | 0, 144 | 0 145 | ], 146 | "extensions": { 147 | "KHR_materials_unlit": {} 148 | }, 149 | "name": "Material0", 150 | "pbrMetallicRoughness": { 151 | "baseColorFactor": [ 152 | 1, 153 | 1, 154 | 1, 155 | 1 156 | ], 157 | "baseColorTexture": { 158 | "index": 0, 159 | "texCoord": 0 160 | }, 161 | "metallicFactor": 0, 162 | "roughnessFactor": 1 163 | } 164 | } 165 | ], 166 | "meshes": [ 167 | { 168 | "name": "Stereo textured mesh_Material0_0", 169 | "primitives": [ 170 | { 171 | "attributes": { 172 | "NORMAL": 1, 173 | "POSITION": 0, 174 | "TANGENT": 2, 175 | "TEXCOORD_0": 3 176 | }, 177 | "indices": 4, 178 | "material": 0, 179 | "mode": 4 180 | } 181 | ] 182 | } 183 | ], 184 | "nodes": [ 185 | { 186 | "children": [ 187 | 1 188 | ], 189 | "name": "RootNode (gltf orientation matrix)", 190 | "rotation": [ 191 | -0.70710678118654746, 192 | -0, 193 | -0, 194 | 0.70710678118654757 195 | ] 196 | }, 197 | { 198 | "children": [ 199 | 2 200 | ], 201 | "name": "RootNode (model correction matrix)" 202 | }, 203 | { 204 | "children": [ 205 | 3 206 | ], 207 | "matrix": [ 208 | 1, 209 | 0, 210 | 0, 211 | 0, 212 | 0, 213 | 0, 214 | 1, 215 | 0, 216 | 0, 217 | -1, 218 | 0, 219 | 0, 220 | 0, 221 | 0, 222 | 0, 223 | 1 224 | ], 225 | "name": "sketchfabTemp.obj.fbx" 226 | }, 227 | { 228 | "children": [ 229 | 4 230 | ], 231 | "name": "RootNode" 232 | }, 233 | { 234 | "children": [ 235 | 5 236 | ], 237 | "name": "Stereo textured mesh" 238 | }, 239 | { 240 | "mesh": 0, 241 | "name": "Stereo textured mesh_Material0_0" 242 | } 243 | ], 244 | "samplers": [ 245 | { 246 | "magFilter": 9729, 247 | "minFilter": 9987, 248 | "wrapS": 10497, 249 | "wrapT": 10497 250 | } 251 | ], 252 | "scene": 0, 253 | "scenes": [ 254 | { 255 | "name": "OSG_Scene", 256 | "nodes": [ 257 | 0 258 | ] 259 | } 260 | ], 261 | "textures": [ 262 | { 263 | "sampler": 0, 264 | "source": 0 265 | } 266 | ] 267 | } 268 | 269 | -------------------------------------------------------------------------------- /android/app/sampledata/Anubis Statue/scene.sfa: -------------------------------------------------------------------------------- 1 | { 2 | materials: [ 3 | { 4 | name: 'Material0', 5 | parameters: [ 6 | { 7 | baseColorFactor: [ 8 | 1, 9 | 1, 10 | 1, 11 | 1, 12 | ], 13 | }, 14 | { 15 | baseColor: 'Material0_baseColor', 16 | }, 17 | { 18 | diffuseColorFactor: null, 19 | }, 20 | { 21 | diffuseColor: null, 22 | }, 23 | { 24 | normal: null, 25 | }, 26 | { 27 | metallicFactor: 0, 28 | }, 29 | { 30 | roughnessFactor: 1, 31 | }, 32 | { 33 | specularFactor: null, 34 | }, 35 | { 36 | glossinessFactor: null, 37 | }, 38 | { 39 | specularGlossiness: null, 40 | }, 41 | { 42 | specularGlossinessCalculation: null, 43 | }, 44 | { 45 | metallicRoughness: null, 46 | }, 47 | { 48 | occlusion: null, 49 | }, 50 | { 51 | emissiveFactor: [ 52 | 0, 53 | 0, 54 | 0, 55 | 1, 56 | ], 57 | }, 58 | { 59 | emissive: null, 60 | }, 61 | { 62 | opacity: null, 63 | }, 64 | ], 65 | source: 'build/sceneform_sdk/default_materials/gltf_material.sfm', 66 | }, 67 | ], 68 | model: { 69 | attributes: [ 70 | 'Position', 71 | 'TexCoord', 72 | 'Orientation', 73 | ], 74 | collision: {}, 75 | file: 'sampledata/Anubis Statue/scene.gltf', 76 | name: 'scene', 77 | recenter: 'root', 78 | scale: 0.002062, 79 | }, 80 | samplers: [ 81 | { 82 | file: 'sampledata/Anubis Statue/textures/Material0_baseColor.jpeg', 83 | name: 'Material0_baseColor', 84 | pipeline_name: 'textures/Material0_baseColor.jpeg', 85 | }, 86 | ], 87 | version: '0.54:2', 88 | } 89 | -------------------------------------------------------------------------------- /android/app/sampledata/Anubis Statue/textures/Material0_baseColor.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/sampledata/Anubis Statue/textures/Material0_baseColor.jpeg -------------------------------------------------------------------------------- /android/app/sampledata/Cube/scene.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/sampledata/Cube/scene.bin -------------------------------------------------------------------------------- /android/app/sampledata/Cube/scene.sfa: -------------------------------------------------------------------------------- 1 | { 2 | materials: [ 3 | { 4 | name: 'Material_29', 5 | parameters: [ 6 | { 7 | baseColorFactor: [ 8 | 1, 9 | 1, 10 | 1, 11 | 1, 12 | ], 13 | }, 14 | { 15 | baseColor: 'Material_29_baseColor', 16 | }, 17 | { 18 | diffuseColorFactor: null, 19 | }, 20 | { 21 | diffuseColor: null, 22 | }, 23 | { 24 | normal: null, 25 | }, 26 | { 27 | metallicFactor: 0, 28 | }, 29 | { 30 | roughnessFactor: 1, 31 | }, 32 | { 33 | specularFactor: null, 34 | }, 35 | { 36 | glossinessFactor: null, 37 | }, 38 | { 39 | specularGlossiness: null, 40 | }, 41 | { 42 | specularGlossinessCalculation: null, 43 | }, 44 | { 45 | metallicRoughness: 'Material_29_metallicRoughness', 46 | }, 47 | { 48 | occlusion: null, 49 | }, 50 | { 51 | emissiveFactor: [ 52 | 0, 53 | 0, 54 | 0, 55 | 1, 56 | ], 57 | }, 58 | { 59 | emissive: null, 60 | }, 61 | { 62 | opacity: null, 63 | }, 64 | ], 65 | source: 'build/sceneform_sdk/default_materials/gltf_material.sfm', 66 | }, 67 | ], 68 | model: { 69 | attributes: [ 70 | 'Position', 71 | 'TexCoord', 72 | 'Orientation', 73 | ], 74 | collision: {}, 75 | file: 'sampledata/Cube/scene.gltf', 76 | name: 'scene', 77 | recenter: 'root', 78 | scale: 0.0015, 79 | }, 80 | samplers: [ 81 | { 82 | file: 'sampledata/Cube/textures/Material_29_baseColor.jpg', 83 | name: 'Material_29_baseColor', 84 | pipeline_name: 'textures/Material_29_baseColor.jpg', 85 | }, 86 | { 87 | file: 'sampledata/Cube/textures/Material_29_metallicRoughness.png', 88 | name: 'Material_29_metallicRoughness', 89 | params: { 90 | usage_type: 'Data', 91 | }, 92 | pipeline_name: 'textures/Material_29_metallicRoughness.png', 93 | }, 94 | ], 95 | version: '0.54:2', 96 | } 97 | -------------------------------------------------------------------------------- /android/app/sampledata/Cube/textures/Material_29_baseColor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/sampledata/Cube/textures/Material_29_baseColor.jpg -------------------------------------------------------------------------------- /android/app/sampledata/Cube/textures/Material_29_metallicRoughness.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/sampledata/Cube/textures/Material_29_metallicRoughness.png -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 12 | 16 | 23 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /android/app/src/main/assets/cubeModel.sfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/src/main/assets/cubeModel.sfb -------------------------------------------------------------------------------- /android/app/src/main/assets/statueModel.sfb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/src/main/assets/statueModel.sfb -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/learn_ar_flutter/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.learn_ar_flutter 2 | 3 | import android.os.Bundle 4 | 5 | import io.flutter.app.FlutterActivity 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | GeneratedPluginRegistrant.registerWith(this) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.2.71' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50" 11 | classpath 'com.google.ar.sceneform:plugin:1.13.0' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true 5 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Dec 05 02:20:03 IST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/catModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/assets/catModel.png -------------------------------------------------------------------------------- /assets/cubeModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/assets/cubeModel.png -------------------------------------------------------------------------------- /assets/githubLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/assets/githubLogo.png -------------------------------------------------------------------------------- /assets/legoHouseModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/assets/legoHouseModel.png -------------------------------------------------------------------------------- /assets/statueModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/assets/statueModel.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 19 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 20 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXCopyFilesBuildPhase section */ 24 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 25 | isa = PBXCopyFilesBuildPhase; 26 | buildActionMask = 2147483647; 27 | dstPath = ""; 28 | dstSubfolderSpec = 10; 29 | files = ( 30 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 31 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 32 | ); 33 | name = "Embed Frameworks"; 34 | runOnlyForDeploymentPostprocessing = 0; 35 | }; 36 | /* End PBXCopyFilesBuildPhase section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 40 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 41 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 42 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 43 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 44 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 45 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 46 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 47 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 48 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 49 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 62 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 9740EEB11CF90186004384FC /* Flutter */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 3B80C3931E831B6300D905FE /* App.framework */, 73 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 74 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 75 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 76 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 77 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 78 | ); 79 | name = Flutter; 80 | sourceTree = ""; 81 | }; 82 | 97C146E51CF9000F007C117D = { 83 | isa = PBXGroup; 84 | children = ( 85 | 9740EEB11CF90186004384FC /* Flutter */, 86 | 97C146F01CF9000F007C117D /* Runner */, 87 | 97C146EF1CF9000F007C117D /* Products */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | 97C146EF1CF9000F007C117D /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 97C146EE1CF9000F007C117D /* Runner.app */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | 97C146F01CF9000F007C117D /* Runner */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 103 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 104 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 105 | 97C147021CF9000F007C117D /* Info.plist */, 106 | 97C146F11CF9000F007C117D /* Supporting Files */, 107 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 108 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 109 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 110 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 111 | ); 112 | path = Runner; 113 | sourceTree = ""; 114 | }; 115 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | ); 119 | name = "Supporting Files"; 120 | sourceTree = ""; 121 | }; 122 | /* End PBXGroup section */ 123 | 124 | /* Begin PBXNativeTarget section */ 125 | 97C146ED1CF9000F007C117D /* Runner */ = { 126 | isa = PBXNativeTarget; 127 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 128 | buildPhases = ( 129 | 9740EEB61CF901F6004384FC /* Run Script */, 130 | 97C146EA1CF9000F007C117D /* Sources */, 131 | 97C146EB1CF9000F007C117D /* Frameworks */, 132 | 97C146EC1CF9000F007C117D /* Resources */, 133 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 134 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 135 | ); 136 | buildRules = ( 137 | ); 138 | dependencies = ( 139 | ); 140 | name = Runner; 141 | productName = Runner; 142 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 143 | productType = "com.apple.product-type.application"; 144 | }; 145 | /* End PBXNativeTarget section */ 146 | 147 | /* Begin PBXProject section */ 148 | 97C146E61CF9000F007C117D /* Project object */ = { 149 | isa = PBXProject; 150 | attributes = { 151 | LastUpgradeCheck = 1020; 152 | ORGANIZATIONNAME = "The Chromium Authors"; 153 | TargetAttributes = { 154 | 97C146ED1CF9000F007C117D = { 155 | CreatedOnToolsVersion = 7.3.1; 156 | LastSwiftMigration = 0910; 157 | }; 158 | }; 159 | }; 160 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 161 | compatibilityVersion = "Xcode 3.2"; 162 | developmentRegion = en; 163 | hasScannedForEncodings = 0; 164 | knownRegions = ( 165 | en, 166 | Base, 167 | ); 168 | mainGroup = 97C146E51CF9000F007C117D; 169 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 170 | projectDirPath = ""; 171 | projectRoot = ""; 172 | targets = ( 173 | 97C146ED1CF9000F007C117D /* Runner */, 174 | ); 175 | }; 176 | /* End PBXProject section */ 177 | 178 | /* Begin PBXResourcesBuildPhase section */ 179 | 97C146EC1CF9000F007C117D /* Resources */ = { 180 | isa = PBXResourcesBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 184 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 185 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 186 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 187 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXResourcesBuildPhase section */ 192 | 193 | /* Begin PBXShellScriptBuildPhase section */ 194 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Thin Binary"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 207 | }; 208 | 9740EEB61CF901F6004384FC /* Run Script */ = { 209 | isa = PBXShellScriptBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | ); 213 | inputPaths = ( 214 | ); 215 | name = "Run Script"; 216 | outputPaths = ( 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | shellPath = /bin/sh; 220 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 221 | }; 222 | /* End PBXShellScriptBuildPhase section */ 223 | 224 | /* Begin PBXSourcesBuildPhase section */ 225 | 97C146EA1CF9000F007C117D /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 230 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | /* End PBXSourcesBuildPhase section */ 235 | 236 | /* Begin PBXVariantGroup section */ 237 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 238 | isa = PBXVariantGroup; 239 | children = ( 240 | 97C146FB1CF9000F007C117D /* Base */, 241 | ); 242 | name = Main.storyboard; 243 | sourceTree = ""; 244 | }; 245 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 246 | isa = PBXVariantGroup; 247 | children = ( 248 | 97C147001CF9000F007C117D /* Base */, 249 | ); 250 | name = LaunchScreen.storyboard; 251 | sourceTree = ""; 252 | }; 253 | /* End PBXVariantGroup section */ 254 | 255 | /* Begin XCBuildConfiguration section */ 256 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 257 | isa = XCBuildConfiguration; 258 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 259 | buildSettings = { 260 | ALWAYS_SEARCH_USER_PATHS = NO; 261 | CLANG_ANALYZER_NONNULL = YES; 262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 263 | CLANG_CXX_LIBRARY = "libc++"; 264 | CLANG_ENABLE_MODULES = YES; 265 | CLANG_ENABLE_OBJC_ARC = YES; 266 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 267 | CLANG_WARN_BOOL_CONVERSION = YES; 268 | CLANG_WARN_COMMA = YES; 269 | CLANG_WARN_CONSTANT_CONVERSION = YES; 270 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 271 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 272 | CLANG_WARN_EMPTY_BODY = YES; 273 | CLANG_WARN_ENUM_CONVERSION = YES; 274 | CLANG_WARN_INFINITE_RECURSION = YES; 275 | CLANG_WARN_INT_CONVERSION = YES; 276 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 278 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 279 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 280 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 281 | CLANG_WARN_STRICT_PROTOTYPES = YES; 282 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 283 | CLANG_WARN_UNREACHABLE_CODE = YES; 284 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 285 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 286 | COPY_PHASE_STRIP = NO; 287 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 288 | ENABLE_NS_ASSERTIONS = NO; 289 | ENABLE_STRICT_OBJC_MSGSEND = YES; 290 | GCC_C_LANGUAGE_STANDARD = gnu99; 291 | GCC_NO_COMMON_BLOCKS = YES; 292 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 293 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 294 | GCC_WARN_UNDECLARED_SELECTOR = YES; 295 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 296 | GCC_WARN_UNUSED_FUNCTION = YES; 297 | GCC_WARN_UNUSED_VARIABLE = YES; 298 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 299 | MTL_ENABLE_DEBUG_INFO = NO; 300 | SDKROOT = iphoneos; 301 | TARGETED_DEVICE_FAMILY = "1,2"; 302 | VALIDATE_PRODUCT = YES; 303 | }; 304 | name = Profile; 305 | }; 306 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 307 | isa = XCBuildConfiguration; 308 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 309 | buildSettings = { 310 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 311 | CLANG_ENABLE_MODULES = YES; 312 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 313 | ENABLE_BITCODE = NO; 314 | FRAMEWORK_SEARCH_PATHS = ( 315 | "$(inherited)", 316 | "$(PROJECT_DIR)/Flutter", 317 | ); 318 | INFOPLIST_FILE = Runner/Info.plist; 319 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 320 | LIBRARY_SEARCH_PATHS = ( 321 | "$(inherited)", 322 | "$(PROJECT_DIR)/Flutter", 323 | ); 324 | PRODUCT_BUNDLE_IDENTIFIER = com.example.learnArFlutter; 325 | PRODUCT_NAME = "$(TARGET_NAME)"; 326 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 327 | SWIFT_VERSION = 4.0; 328 | VERSIONING_SYSTEM = "apple-generic"; 329 | }; 330 | name = Profile; 331 | }; 332 | 97C147031CF9000F007C117D /* Debug */ = { 333 | isa = XCBuildConfiguration; 334 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 335 | buildSettings = { 336 | ALWAYS_SEARCH_USER_PATHS = NO; 337 | CLANG_ANALYZER_NONNULL = YES; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 343 | CLANG_WARN_BOOL_CONVERSION = YES; 344 | CLANG_WARN_COMMA = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 348 | CLANG_WARN_EMPTY_BODY = YES; 349 | CLANG_WARN_ENUM_CONVERSION = YES; 350 | CLANG_WARN_INFINITE_RECURSION = YES; 351 | CLANG_WARN_INT_CONVERSION = YES; 352 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 354 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 356 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 357 | CLANG_WARN_STRICT_PROTOTYPES = YES; 358 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 359 | CLANG_WARN_UNREACHABLE_CODE = YES; 360 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 361 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 362 | COPY_PHASE_STRIP = NO; 363 | DEBUG_INFORMATION_FORMAT = dwarf; 364 | ENABLE_STRICT_OBJC_MSGSEND = YES; 365 | ENABLE_TESTABILITY = YES; 366 | GCC_C_LANGUAGE_STANDARD = gnu99; 367 | GCC_DYNAMIC_NO_PIC = NO; 368 | GCC_NO_COMMON_BLOCKS = YES; 369 | GCC_OPTIMIZATION_LEVEL = 0; 370 | GCC_PREPROCESSOR_DEFINITIONS = ( 371 | "DEBUG=1", 372 | "$(inherited)", 373 | ); 374 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 375 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 376 | GCC_WARN_UNDECLARED_SELECTOR = YES; 377 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 378 | GCC_WARN_UNUSED_FUNCTION = YES; 379 | GCC_WARN_UNUSED_VARIABLE = YES; 380 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 381 | MTL_ENABLE_DEBUG_INFO = YES; 382 | ONLY_ACTIVE_ARCH = YES; 383 | SDKROOT = iphoneos; 384 | TARGETED_DEVICE_FAMILY = "1,2"; 385 | }; 386 | name = Debug; 387 | }; 388 | 97C147041CF9000F007C117D /* Release */ = { 389 | isa = XCBuildConfiguration; 390 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 391 | buildSettings = { 392 | ALWAYS_SEARCH_USER_PATHS = NO; 393 | CLANG_ANALYZER_NONNULL = YES; 394 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 395 | CLANG_CXX_LIBRARY = "libc++"; 396 | CLANG_ENABLE_MODULES = YES; 397 | CLANG_ENABLE_OBJC_ARC = YES; 398 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 399 | CLANG_WARN_BOOL_CONVERSION = YES; 400 | CLANG_WARN_COMMA = YES; 401 | CLANG_WARN_CONSTANT_CONVERSION = YES; 402 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 403 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 404 | CLANG_WARN_EMPTY_BODY = YES; 405 | CLANG_WARN_ENUM_CONVERSION = YES; 406 | CLANG_WARN_INFINITE_RECURSION = YES; 407 | CLANG_WARN_INT_CONVERSION = YES; 408 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 409 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 410 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 412 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 413 | CLANG_WARN_STRICT_PROTOTYPES = YES; 414 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 415 | CLANG_WARN_UNREACHABLE_CODE = YES; 416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 417 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 418 | COPY_PHASE_STRIP = NO; 419 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 420 | ENABLE_NS_ASSERTIONS = NO; 421 | ENABLE_STRICT_OBJC_MSGSEND = YES; 422 | GCC_C_LANGUAGE_STANDARD = gnu99; 423 | GCC_NO_COMMON_BLOCKS = YES; 424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 426 | GCC_WARN_UNDECLARED_SELECTOR = YES; 427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 428 | GCC_WARN_UNUSED_FUNCTION = YES; 429 | GCC_WARN_UNUSED_VARIABLE = YES; 430 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 431 | MTL_ENABLE_DEBUG_INFO = NO; 432 | SDKROOT = iphoneos; 433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | VALIDATE_PRODUCT = YES; 436 | }; 437 | name = Release; 438 | }; 439 | 97C147061CF9000F007C117D /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | CLANG_ENABLE_MODULES = YES; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.learnArFlutter; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | SWIFT_VERSION = 4.0; 462 | VERSIONING_SYSTEM = "apple-generic"; 463 | }; 464 | name = Debug; 465 | }; 466 | 97C147071CF9000F007C117D /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 469 | buildSettings = { 470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 471 | CLANG_ENABLE_MODULES = YES; 472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 473 | ENABLE_BITCODE = NO; 474 | FRAMEWORK_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "$(PROJECT_DIR)/Flutter", 477 | ); 478 | INFOPLIST_FILE = Runner/Info.plist; 479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 480 | LIBRARY_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "$(PROJECT_DIR)/Flutter", 483 | ); 484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.learnArFlutter; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 487 | SWIFT_VERSION = 4.0; 488 | VERSIONING_SYSTEM = "apple-generic"; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | 97C147031CF9000F007C117D /* Debug */, 499 | 97C147041CF9000F007C117D /* Release */, 500 | 249021D3217E4FDB00AE95B9 /* Profile */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 97C147061CF9000F007C117D /* Debug */, 509 | 97C147071CF9000F007C117D /* Release */, 510 | 249021D4217E4FDB00AE95B9 /* Profile */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | /* End XCConfigurationList section */ 516 | 517 | }; 518 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 519 | } 520 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/akshansh2000/learn_ar_flutter/d3d84a57395acce999cb3f9206917febc171913f/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | learn_ar_flutter 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /lib/about_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:learn_ar_flutter/strings.dart' as strings; 4 | 5 | import 'package:url_launcher/url_launcher.dart'; 6 | 7 | class AboutWidget extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | return AlertDialog( 11 | shape: RoundedRectangleBorder( 12 | borderRadius: BorderRadius.all( 13 | Radius.circular(20.0), 14 | ), 15 | ), 16 | content: Padding( 17 | padding: EdgeInsets.only(top: 10), 18 | child: Column( 19 | mainAxisSize: MainAxisSize.min, 20 | children: [ 21 | Text( 22 | strings.aboutApp + "\n", 23 | textAlign: TextAlign.center, 24 | ), 25 | Padding( 26 | padding: EdgeInsets.only(top: 10), 27 | child: GestureDetector( 28 | child: Image.asset( 29 | "assets/githubLogo.png", 30 | color: Colors.white, 31 | width: 50, 32 | ), 33 | onTap: () async { 34 | if (await canLaunch(strings.repoLink)) 35 | await launch(strings.repoLink); 36 | else 37 | throw "Could not launch"; 38 | }, 39 | ), 40 | ), 41 | ], 42 | ), 43 | ), 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/camera_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | 4 | import 'package:arcore_flutter_plugin/arcore_flutter_plugin.dart'; 5 | 6 | class CameraScreen extends StatefulWidget { 7 | const CameraScreen({ 8 | @required this.selectedModel, 9 | Key key, 10 | }) : super(key: key); 11 | 12 | final String selectedModel; 13 | 14 | @override 15 | _CameraScreenState createState() => _CameraScreenState(); 16 | } 17 | 18 | class _CameraScreenState extends State { 19 | ArCoreController controller; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | SystemChrome.setSystemUIOverlayStyle( 24 | SystemUiOverlayStyle( 25 | statusBarIconBrightness: Brightness.light, 26 | systemNavigationBarIconBrightness: Brightness.dark, 27 | ), 28 | ); 29 | 30 | return Scaffold( 31 | body: ArCoreView( 32 | onArCoreViewCreated: _onArCoreViewCreated, 33 | enableTapRecognizer: true, 34 | ), 35 | ); 36 | } 37 | 38 | _onArCoreViewCreated(ArCoreController localController) { 39 | controller = localController; 40 | controller.onPlaneTap = _onPlaneTap; 41 | } 42 | 43 | _onPlaneTap(List hits) => _onHitDetected(hits.first); 44 | 45 | _onHitDetected(ArCoreHitTestResult plane) { 46 | controller.addArCoreNodeWithAnchor( 47 | ArCoreReferenceNode( 48 | name: widget.selectedModel, 49 | obcject3DFileName: widget.selectedModel + ".sfb", 50 | position: plane.pose.translation, 51 | rotation: plane.pose.rotation, 52 | ), 53 | ); 54 | } 55 | 56 | @override 57 | void dispose() { 58 | controller.dispose(); 59 | super.dispose(); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/generated_plugin_registrant.dart: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // ignore: unused_import 6 | import 'dart:ui'; 7 | 8 | import 'package:url_launcher_web/url_launcher_web.dart'; 9 | 10 | import 'package:flutter_web_plugins/flutter_web_plugins.dart'; 11 | 12 | // ignore: public_member_api_docs 13 | void registerPlugins(PluginRegistry registry) { 14 | UrlLauncherPlugin.registerWith(registry.registrarFor(UrlLauncherPlugin)); 15 | registry.registerMessageHandler(); 16 | } 17 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | 4 | import 'package:learn_ar_flutter/starting_page.dart'; 5 | 6 | main() => runApp(MyApp()); 7 | 8 | class MyApp extends StatelessWidget { 9 | const MyApp({Key key}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | SystemChrome.setPreferredOrientations([ 14 | DeviceOrientation.portraitUp, 15 | ]); 16 | 17 | return MaterialApp( 18 | theme: ThemeData( 19 | primaryColor: Colors.deepPurple, 20 | accentColor: Colors.red, 21 | textTheme: TextTheme( 22 | bodyText1: TextStyle(color: Colors.deepPurple, fontSize: 50), 23 | headline3: TextStyle(color: Colors.white, fontSize: 25)), 24 | dialogTheme: DialogTheme( 25 | backgroundColor: Colors.deepPurple, 26 | contentTextStyle: TextStyle(color: Colors.white, fontSize: 16), 27 | ), 28 | scaffoldBackgroundColor: Colors.white, 29 | ), 30 | home: StartingPage(), 31 | debugShowCheckedModeBanner: false, 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/model_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:learn_ar_flutter/model_event.dart'; 4 | import 'package:learn_ar_flutter/strings.dart' as strings; 5 | 6 | class ModelBloc { 7 | String _prefab = strings.statuePrefab; 8 | 9 | final _modelStateController = StreamController(); 10 | StreamSink get _inModel => _modelStateController.sink; 11 | Stream get selectedModel => _modelStateController.stream; 12 | 13 | final _modelEventController = StreamController(); 14 | StreamSink get modelSink => _modelEventController.sink; 15 | 16 | ModelBloc() { 17 | void _mapEventToState(ModelEvent event) { 18 | if (event is StatueModelSelectEvent) { 19 | _prefab = strings.statuePrefab; 20 | } else if (event is CubeModelSelectEvent) { 21 | _prefab = strings.cubePrefab; 22 | } 23 | 24 | _inModel.add(_prefab); 25 | } 26 | 27 | _modelEventController.stream.listen(_mapEventToState); 28 | } 29 | 30 | void dispose() { 31 | _modelStateController.close(); 32 | _modelEventController.close(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/model_event.dart: -------------------------------------------------------------------------------- 1 | abstract class ModelEvent {} 2 | 3 | class StatueModelSelectEvent extends ModelEvent {} 4 | 5 | class CubeModelSelectEvent extends ModelEvent {} 6 | -------------------------------------------------------------------------------- /lib/starting_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/services.dart'; 4 | 5 | import 'package:learn_ar_flutter/camera_screen.dart'; 6 | import 'package:learn_ar_flutter/model_bloc.dart'; 7 | import 'package:learn_ar_flutter/model_event.dart'; 8 | import 'package:learn_ar_flutter/about_widget.dart'; 9 | import 'package:learn_ar_flutter/strings.dart' as strings; 10 | 11 | class StartingPage extends StatefulWidget { 12 | const StartingPage({Key key}) : super(key: key); 13 | 14 | @override 15 | _StartingPageState createState() => _StartingPageState(); 16 | } 17 | 18 | class _StartingPageState extends State { 19 | final _bloc = ModelBloc(); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | SystemChrome.setSystemUIOverlayStyle( 24 | SystemUiOverlayStyle( 25 | statusBarColor: Colors.transparent, 26 | statusBarIconBrightness: Brightness.dark, 27 | systemNavigationBarColor: Theme.of(context).primaryColor, 28 | systemNavigationBarIconBrightness: Brightness.light, 29 | ), 30 | ); 31 | 32 | final size = MediaQuery.of(context).size; 33 | 34 | return Scaffold( 35 | appBar: AppBar( 36 | centerTitle: true, 37 | title: Text( 38 | 'LearnARF', 39 | style: Theme.of(context).textTheme.headline3, 40 | ), 41 | actions: [ 42 | IconButton( 43 | icon: Icon(Icons.info_outline), 44 | onPressed: () => showDialog( 45 | context: context, 46 | builder: (context) => AboutWidget(), 47 | ), 48 | ), 49 | ], 50 | ), 51 | body: Center( 52 | child: StreamBuilder( 53 | stream: _bloc.selectedModel, 54 | initialData: strings.statuePrefab, 55 | builder: (context, snapshot) { 56 | return Padding( 57 | padding: const EdgeInsets.all(8.0), 58 | child: Column( 59 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 60 | children: [ 61 | Expanded( 62 | child: GridView.count( 63 | crossAxisCount: 2, 64 | padding: EdgeInsets.all(5.0), 65 | crossAxisSpacing: 8.0, 66 | mainAxisSpacing: 8.0, 67 | children: [ 68 | customContainer( 69 | strings.statuePrefab, 70 | size, 71 | snapshot.data == strings.statuePrefab, 72 | ), 73 | customContainer( 74 | strings.cubePrefab, 75 | size, 76 | snapshot.data == strings.cubePrefab, 77 | ), 78 | ], 79 | ), 80 | ), 81 | FlatButton( 82 | highlightColor: Colors.transparent, 83 | splashColor: Colors.transparent, 84 | child: Text( 85 | strings.start.toUpperCase(), 86 | style: Theme.of(context).textTheme.bodyText1, 87 | ), 88 | onPressed: () => Navigator.of(context).push( 89 | CupertinoPageRoute( 90 | builder: (builder) => CameraScreen( 91 | selectedModel: snapshot.data, 92 | ), 93 | ), 94 | ), 95 | ), 96 | ], 97 | ), 98 | ); 99 | }, 100 | ), 101 | ), 102 | ); 103 | } 104 | 105 | Widget customContainer(String image, Size size, bool border) { 106 | return GestureDetector( 107 | child: AnimatedContainer( 108 | duration: Duration(milliseconds: 200), 109 | width: size.width * 7 / 10, 110 | height: size.width * 7 / 10, 111 | decoration: BoxDecoration( 112 | color: Colors.transparent, 113 | borderRadius: BorderRadius.circular(500), 114 | border: border 115 | ? Border.all( 116 | color: Theme.of(context).accentColor, 117 | width: 6, 118 | ) 119 | : null, 120 | ), 121 | child: ClipRRect( 122 | borderRadius: BorderRadius.circular(500), 123 | child: Image.asset( 124 | "assets/" + image + ".png", 125 | fit: BoxFit.contain, 126 | ), 127 | ), 128 | ), 129 | onTap: () => _bloc.modelSink.add( 130 | image == strings.statuePrefab 131 | ? StatueModelSelectEvent() 132 | : CubeModelSelectEvent(), 133 | ), 134 | ); 135 | } 136 | 137 | @override 138 | void dispose() { 139 | _bloc.dispose(); 140 | super.dispose(); 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /lib/strings.dart: -------------------------------------------------------------------------------- 1 | String start = "Start"; 2 | String statuePrefab = "statueModel"; 3 | String cubePrefab = "cubeModel"; 4 | String catPrefab = "catModel"; 5 | String legoHousePrefab = "legoHouseModel"; 6 | String aboutApp = "LearnARF is a Flutter application which uses " 7 | "Google's ARCore to spawn 3D models into the real world. " 8 | "Additionally, it uses the Sceneform SDK to make it easier " 9 | "to handle 3D models."; 10 | String repoLink = "https://github.com/akshansh2000/learn_ar_flutter"; 11 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | arcore_flutter_plugin: 5 | dependency: "direct main" 6 | description: 7 | name: arcore_flutter_plugin 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "0.0.5+1" 11 | async: 12 | dependency: transitive 13 | description: 14 | name: async 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.5.0-nullsafety.1" 18 | boolean_selector: 19 | dependency: transitive 20 | description: 21 | name: boolean_selector 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.1.0-nullsafety.1" 25 | characters: 26 | dependency: transitive 27 | description: 28 | name: characters 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.1.0-nullsafety.3" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.2.0-nullsafety.1" 39 | clock: 40 | dependency: transitive 41 | description: 42 | name: clock 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.1.0-nullsafety.1" 46 | collection: 47 | dependency: transitive 48 | description: 49 | name: collection 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.15.0-nullsafety.3" 53 | cupertino_icons: 54 | dependency: "direct main" 55 | description: 56 | name: cupertino_icons 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "0.1.3" 60 | fake_async: 61 | dependency: transitive 62 | description: 63 | name: fake_async 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.2.0-nullsafety.1" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_test: 73 | dependency: "direct dev" 74 | description: flutter 75 | source: sdk 76 | version: "0.0.0" 77 | flutter_web_plugins: 78 | dependency: transitive 79 | description: flutter 80 | source: sdk 81 | version: "0.0.0" 82 | matcher: 83 | dependency: transitive 84 | description: 85 | name: matcher 86 | url: "https://pub.dartlang.org" 87 | source: hosted 88 | version: "0.12.10-nullsafety.1" 89 | meta: 90 | dependency: transitive 91 | description: 92 | name: meta 93 | url: "https://pub.dartlang.org" 94 | source: hosted 95 | version: "1.3.0-nullsafety.3" 96 | path: 97 | dependency: transitive 98 | description: 99 | name: path 100 | url: "https://pub.dartlang.org" 101 | source: hosted 102 | version: "1.8.0-nullsafety.1" 103 | plugin_platform_interface: 104 | dependency: transitive 105 | description: 106 | name: plugin_platform_interface 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "1.0.1" 110 | sky_engine: 111 | dependency: transitive 112 | description: flutter 113 | source: sdk 114 | version: "0.0.99" 115 | source_span: 116 | dependency: transitive 117 | description: 118 | name: source_span 119 | url: "https://pub.dartlang.org" 120 | source: hosted 121 | version: "1.8.0-nullsafety.2" 122 | stack_trace: 123 | dependency: transitive 124 | description: 125 | name: stack_trace 126 | url: "https://pub.dartlang.org" 127 | source: hosted 128 | version: "1.10.0-nullsafety.1" 129 | stream_channel: 130 | dependency: transitive 131 | description: 132 | name: stream_channel 133 | url: "https://pub.dartlang.org" 134 | source: hosted 135 | version: "2.1.0-nullsafety.1" 136 | string_scanner: 137 | dependency: transitive 138 | description: 139 | name: string_scanner 140 | url: "https://pub.dartlang.org" 141 | source: hosted 142 | version: "1.1.0-nullsafety.1" 143 | term_glyph: 144 | dependency: transitive 145 | description: 146 | name: term_glyph 147 | url: "https://pub.dartlang.org" 148 | source: hosted 149 | version: "1.2.0-nullsafety.1" 150 | test_api: 151 | dependency: transitive 152 | description: 153 | name: test_api 154 | url: "https://pub.dartlang.org" 155 | source: hosted 156 | version: "0.2.19-nullsafety.2" 157 | typed_data: 158 | dependency: transitive 159 | description: 160 | name: typed_data 161 | url: "https://pub.dartlang.org" 162 | source: hosted 163 | version: "1.3.0-nullsafety.3" 164 | url_launcher: 165 | dependency: "direct main" 166 | description: 167 | name: url_launcher 168 | url: "https://pub.dartlang.org" 169 | source: hosted 170 | version: "5.4.1" 171 | url_launcher_macos: 172 | dependency: transitive 173 | description: 174 | name: url_launcher_macos 175 | url: "https://pub.dartlang.org" 176 | source: hosted 177 | version: "0.0.1+2" 178 | url_launcher_platform_interface: 179 | dependency: transitive 180 | description: 181 | name: url_launcher_platform_interface 182 | url: "https://pub.dartlang.org" 183 | source: hosted 184 | version: "1.0.5" 185 | url_launcher_web: 186 | dependency: transitive 187 | description: 188 | name: url_launcher_web 189 | url: "https://pub.dartlang.org" 190 | source: hosted 191 | version: "0.1.0+2" 192 | vector_math: 193 | dependency: transitive 194 | description: 195 | name: vector_math 196 | url: "https://pub.dartlang.org" 197 | source: hosted 198 | version: "2.1.0-nullsafety.3" 199 | sdks: 200 | dart: ">=2.10.0-110 <2.11.0" 201 | flutter: ">=1.12.8 <2.0.0" 202 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: learn_ar_flutter 2 | description: A new Flutter project. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.2 26 | arcore_flutter_plugin: 27 | url_launcher: 28 | 29 | dev_dependencies: 30 | flutter_test: 31 | sdk: flutter 32 | 33 | 34 | # For information on the generic Dart part of this file, see the 35 | # following page: https://dart.dev/tools/pub/pubspec 36 | 37 | # The following section is specific to Flutter. 38 | flutter: 39 | 40 | # The following line ensures that the Material Icons font is 41 | # included with your application, so that you can use the icons in 42 | # the material Icons class. 43 | uses-material-design: true 44 | 45 | # To add assets to your application, add an assets section, like this: 46 | assets: 47 | - assets/ 48 | 49 | # An image asset can refer to one or more resolution-specific "variants", see 50 | # https://flutter.dev/assets-and-images/#resolution-aware. 51 | 52 | # For details regarding adding assets from package dependencies, see 53 | # https://flutter.dev/assets-and-images/#from-packages 54 | 55 | # To add custom fonts to your application, add a fonts section here, 56 | # in this "flutter" section. Each entry in this list should have a 57 | # "family" key with the font family name, and a "fonts" key with a 58 | # list giving the asset and other descriptors for the font. For 59 | # example: 60 | # fonts: 61 | # - family: Schyler 62 | # fonts: 63 | # - asset: fonts/Schyler-Regular.ttf 64 | # - asset: fonts/Schyler-Italic.ttf 65 | # style: italic 66 | # - family: Trajan Pro 67 | # fonts: 68 | # - asset: fonts/TrajanPro.ttf 69 | # - asset: fonts/TrajanPro_Bold.ttf 70 | # weight: 700 71 | # 72 | # For details regarding fonts from package dependencies, 73 | # see https://flutter.dev/custom-fonts/#from-packages 74 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:learn_ar_flutter/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | learn_ar_flutter 6 | 7 | 8 | 9 | 10 | 11 | --------------------------------------------------------------------------------