ar_core 0.0.2+7 copy "ar_core: ^0.0.2+7" to clipboard
ar_core: ^0.0.2+7 copied to clipboard

Flutter Plugin for adding Augmented Reality in application - Supports Real time camera and objects plecement of an object on iOS and Android devices

example/lib/main.dart

import 'package:ar_core/ar_core.dart';
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';



List<CameraDescription> cameras = [];
Future<void> main() async {
  try {
    WidgetsFlutterBinding.ensureInitialized();
    cameras = await availableCameras();
  } on CameraException catch (e) {
    print(e.description);
  }
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Augmented Reality Demo',
      theme: ThemeData(

        primarySwatch: Colors.blue,
      ),
      home:  const AugmentedReality(),
    );
  }
}

class AugmentedReality extends StatefulWidget {
  const AugmentedReality({Key? key}) : super(key: key);

  @override
  _AugmentedRealityState createState() => _AugmentedRealityState();
}

class _AugmentedRealityState extends State<AugmentedReality> {
  @override
  Widget build(BuildContext context) {
    return Augmented(
        image: 'https://freepngimg.com/static/img/cat/hair.png'
    );
  }
}
28
likes
130
pub points
58%
popularity

Publisher

unverified uploader

Flutter Plugin for adding Augmented Reality in application - Supports Real time camera and objects plecement of an object on iOS and Android devices

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

camera, flutter

More

Packages that depend on ar_core