ar_location_view 0.0.9 copy "ar_location_view: ^0.0.9" to clipboard
ar_location_view: ^0.0.9 copied to clipboard

PlatformAndroidiOS
outdated

ArLocationView is designed to used in areas with large concentration of static POIs

example/lib/main.dart

import 'package:ar_location_view_example/annotation_view.dart';
import 'package:ar_location_view_example/annotations.dart';
import 'package:flutter/material.dart';
import 'package:ar_location_view/ar_location_view.dart';
import 'package:geolocator/geolocator.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  List<Annotation> annotations = [];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: ArLocationWidget(
          annotations: annotations,
          showDebugInfoSensor: false,
          annotationViewBuilder: (context, annotation) {
            return AnnotationView(
              key: ValueKey(annotation.uid),
              annotation: annotation as Annotation,
            );
          },
          onLocationChange: (Position position) {
            Future.delayed(const Duration(seconds: 5), () {
              annotations =
                  fakeAnnotation(position: position, numberMaxPoi: 75);
              setState(() {});
            });
          },
        ),
      ),
    );
  }
}
71
likes
150
points
323
downloads

Publisher

unverified uploader

Weekly Downloads

ArLocationView is designed to used in areas with large concentration of static POIs

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

camera, flutter, geolocator, native_device_orientation, permission_handler, plugin_platform_interface, sensors_plus, vector_math

More

Packages that depend on ar_location_view