Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

ar_flutter_plugin

flutter plugin for (collaborative) augmented reality – supports arkit for ios and arcore for android devices.

many thanks to oleksandr leuschenko for the arkit_flutter_plugin and to gian marco di francesco for the arcore_flutter_plugin which both served as a great basis and starting point for this project.

getting started

installing

add the flutter package to your project by running:

flutter pub add ar_flutter_plugin

or manually add this to your pubspec.yaml file (and run flutter pub get):

dependencies:
  ar_flutter_plugin: ^0.4.3

importing

add this to your code:

import 'package:ar_flutter_plugin/ar_flutter_plugin.dart';

example applications

to try out the plugin, it is best to have a look at one of the following examples implemented in the example app:

example name description link to code
debug options simple ar scene with toggles to visualize the world origin, feature points and tracked planes debug options code
local & online objets ar scene with buttons to place gltf objects from the flutter asset folders or glb objects from the internet at a given position, rotation and scale. additional buttons allow to modify scale, position and orientation with regard to the world origin after objects have been placed local & online objects code
objects & anchors on planes ar scene in which tapping on a plane creates an anchor with a 3d model attached to it objects & anchors on planes code
cloud anchors ar scene in which objects can be placed, uploaded and downloaded, thus creating an interactive ar experience that can be shared between multiple devices. currently, the example allows to upload the last placed object along with its anchor and download all anchors within a radius of 100m along with all the attached objects (independent of which device originally placed the objects). as sharing the objects is done by using the google cloud anchor service and firebase, this requires some additional setup, please read getting started with cloud anchors cloud anchors code
external object management similar to the cloud anchors example, but contains ui to choose between different models. rather than being hard-coded, an external database (firestore) is used to manage the available models. as sharing the objects is done by using the google cloud anchor service and firebase, this requires some additional setup, please read getting started with cloud anchors. also make sure that in your firestore database, the collection “models” contains some entries with the fields “name”, “image”, and “uri”, where “uri” points to the raw file of a model in glb format external model management code

plugin architecture

this is a rough sketch of the architecture the plugin implements:

ar_plugin_architecture_highlevel


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.