분류, 패키지 및 저장소 검색

패키지 상세v0.0.2+7

ar_core

앱에 증강 현실을 추가하기 위한 플러터 플러그인 - iOS 및 Android 기기에서 실시간 카메라 및 오브젝트 배치를 지원

AndroidiOSWeb
30일 다운로드
6
좋아요
30
Pub 점수
125

패키지 설치

flutter pub add ar_core

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

ar_core는 iOS 및 Android 모바일 애플리케이션에서 증강 현실(AR) 기능을 가능하게 하는 Flutter 플러그인으로, 실시간 카메라 접근과 3D 객체 배치를 지원합니다. 개발자들은 간단한 API를 사용하여 AR 경험을 직접 앱에 통합할 수 있습니다. 이 플러그인은 각 플랫폼의 네이티브 AR 기능을 활용하며 장치 간 원활한 작동을 위해 설계되었습니다. 현재 웹 AR는 지원하지 않지만, Flutter 앱에서 인터랙티브한 AR 기능을 구축하기 위한 견고한 기반을 제공합니다.

사용 사례

  • 상호작용형 제품 미리보기 만들기
  • AR 게임 개발
  • 3D 모델로 교육 앱 향상
  • 건축 설계 시각화
  • 가상 시도 활성화

주요 기능

  • 실시간 카메라 통합
  • AR 공간에서의 3D 객체 배치
  • 크로스 플랫폼 지원 (iOS 및 안드로이드)
  • 간단한 Flutter API
  • 네이티브 AR 프레임워크 활용

적합한 대상

  • 모바일 AR 앱 개발자
  • 교육 기술 프로젝트
  • 전자상거래 제품 시각화
  • AR 기능을 찾는 게임 개발자
  • immersiv 인터페이스를 탐구하는 UX 디자이너

고려 사항

  • 웹 플랫폼 지원 없음
  • AR 기능을 갖춘 장치가 필요합니다
  • 사용 가능한 문서가 제한되어 있습니다
  • 네이티브 AR 프레임워크에 의존함
  • 복잡한 장면을 위해 추가 설정이 필요할 수 있습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

ar_core Flutter Package for Augmented Reality

pub package

ar_core is an augmented reality mobile application kit for mobile devices that enables the creation of augmented reality applications.

Many thanks to Arslan Raza for the ar_core, he served as a great basis and starting point for this project.

Features

  • Display live camera preview in a widget.
  • Custom Camera, Place anywhere on the Screen.
  • Choose Asset, Network or 3d objects in png.
  • Drag, Resize, Rotate, Zoom in and out objects.
  • Add access to the image stream from Dart.

Getting Started

Installing

Add the Flutter package to your project by running:

flutter pub add ar_core

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

dependencies:
  ar_core: ^0.0.1
iOS

The camera plugin functionality works on iOS 10.0 or higher. If compiling for any version lower than 10.0, make sure to programmatically check the version of iOS running on the device before using any camera plugin features. The device_info_plus plugin, for example, can be used to check the iOS version.

Add two rows to the ios/Runner/Info.plist:

  • one with the key Privacy - Camera Usage Description and a usage description.
  • and one with the key Privacy - Microphone Usage Description and a usage description.

Or in text format add the key:

<key>NSCameraUsageDescription</key>
<string>Can I use the camera please?</string>
<key>NSMicrophoneUsageDescription</key>
<string>Can I use the mic please?</string>
Android

Change the minimum Android sdk version to 21 (or higher) in your android/app/build.gradle file.

minSdkVersion 21

It's important to note that the MediaRecorder class is not working properly on emulators, as stated in the documentation: https://developer.android.com/reference/android/media/MediaRecorder. Specifically, when recording a video with sound enabled and trying to play it back, the duration won't be correct and you will only see the first frame.

Importing

Add this to your code:

import 'package:ar_core/ar_core.dart';
Usage or How to Use

Replace your Scaffold to Augmented(), and it will handle all your view. if you want to pass an image just pass an image as a constructor.

#Write this code in main


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());
}
Add main class
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(
     /// Provide Network Image Link to add your object
    image: 'https://freepngimg.com/static/img/cat/hair.png'
    );
  }
}

카테고리

의존성

의존성 목록 1 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.