arcore_flutter_plugin 0.0.2+2

arcore_flutter_plugin #

Awesome Flutter

Thanks to Oleksandr Leuschenko for inspiration and his precious code: arkit_flutter_plugin

Usage #

I wrote 2 articles for setup you project and start with ARCore Flutter Plugin:

ARCore Flutter Plugin: configurations.

ARCore Flutter Plugin: add object on the plane.

Configure your app #

To use this plugin, add arcore_flutter_plugin as a dependency in your pubspec.yaml file.

  1. Follow official guide to enable ArCore

  2. Add the Sceneform library to your app's build.gradle file:

android {
    // Sceneform libraries use language constructs from Java 8.
    // Add these compile options if targeting minSdkVersion < 26.
    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8

dependencies {

    // Provides ArFragment, and other UX resources.
    implementation ''

    // Alternatively, use ArSceneView without the UX dependency.
    implementation ''
  1. Import the Sceneform plugin into your project (OPTIONAL)

Example #

The simplest code example:

import 'package:arcore_flutter_plugin/arcore_flutter_plugin.dart';
import 'package:flutter/material.dart';
import 'package:vector_math/vector_math_64.dart' as vector;

class HelloWorld extends StatefulWidget {
  _HelloWorldState createState() => _HelloWorldState();

class _HelloWorldState extends State<HelloWorld> {
  ArCoreController arCoreController;

  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Hello World'),
        body: ArCoreView(
          onArCoreViewCreated: _onArCoreViewCreated,

  void _onArCoreViewCreated(ArCoreController controller) {
    arCoreController = controller;


  void _addSphere(ArCoreController controller) {
    final material = ArCoreMaterial(
        color: Color.fromARGB(120, 66, 134, 244), texture: "earth.jpg");
    final sphere = ArCoreSphere(
      materials: [material],
      radius: 0.1,
    final node = ArCoreNode(
      shape: sphere,
      position: vector.Vector3(0, 0, -1.5),

  void _addCylindre(ArCoreController controller) {
    final material = ArCoreMaterial(
      reflectance: 1.0,
    final cylindre = ArCoreCylinder(
      materials: [material],
      radius: 0.5,
      height: 0.3,
    final node = ArCoreNode(
      shape: cylindre,
      position: vector.Vector3(0.0, -0.5, -2.0),

  void _addCube(ArCoreController controller) {
    final material = ArCoreMaterial(
      color: Color.fromARGB(120, 66, 134, 244),
      metallic: 1.0,
    final cube = ArCoreCube(
      materials: [material],
      size: vector.Vector3(0.5, 0.5, 0.5),
    final node = ArCoreNode(
      shape: cube,
      position: vector.Vector3(-0.5, 0.5, -3.5),

  void dispose() {

See the example directory for a complete sample app.

0.0.2+2 #

  • Add ArCoreReferenceNode for use local object (.sfb) or remote objcet (.gltf)

0.0.2+1 #

  • Now you can define children property for node (see example custom_object.dart)

0.0.2 #

  • Add onPlaneDetect handler
  • Add onPlaneTap handler
  • Split addNode in addArCoreNode and addArCodeNodeWithAnchor (for detected plane)

0.0.1 #

  • Add ArCoreNode
  • Add ArCoreRotatingNode
  • Add ArCoreShape (sphere, cube, cylindre)
  • Add shape materials properties (color, texture, metallic, roughness, reflectance)


arcore_flutter_plugin_example #

Demonstrates how to use the arcore_flutter_plugin plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  arcore_flutter_plugin: ^0.0.2+2

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:arcore_flutter_plugin/arcore_flutter_plugin.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Sep 13, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.2


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Maintenance suggestions

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
meta ^1.1.6 1.1.7
vector_math ^2.0.8 2.0.8
Transitive dependencies
collection 1.14.11 1.14.12
sky_engine 0.0.99
typed_data 1.1.6
Dev dependencies