搜索插件、代码仓与 APP 分类

插件详情v3.0.0

panorama_viewer

全景查看器 - 一个可重用的360度全景查看器小部件。

AndroidiOS
近 30 天下载
1.4万
喜欢数
37
Pub 分数
160

安装插件

flutter pub add panorama_viewer

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

全景查看器是一个可重用的Flutter组件,旨在以流畅的交互式导航显示360度全景图像。用户可以通过拖动或倾斜设备来探索沉浸式的球面视图,非常适合虚拟旅游、房地产和旅行应用。该组件注重性能和简洁性,支持Android和iOS平台,并可通过简单的API无缝集成到现有的Flutter项目中。

适合场景

  • 虚拟游览
  • 房地产看房
  • 旅行和旅游应用
  • 互动产品展示
  • 教育类360°内容

主要特点

  • 360度交互式查看
  • 设备运动支持
  • 平滑的平移和缩放
  • 跨平台兼容性(Android 和 iOS)
  • 与 Flutter 的简单集成
  • 针对性能优化的渲染

适合对象

  • 开发沉浸式体验的开发者
  • 需要360°图像查看的应用
  • 针对 Android 和 iOS 的移动应用程序
  • 专注于视觉参与的项目

使用建议

  • 需要高分辨率全景图像
  • 可能会影响低端设备的性能
  • 除了基本控制之外,自定义选项有限
  • 最适合全屏显示

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Panorama Viewer

A 360-degree panorama viewer.

This package is an updated porting of the plugin https://github.com/zesage/panorama.

Getting Started

Add panorama as a dependency in your pubspec.yaml file.

dependencies:
  panorama_viewer: ^2.0.4

Import and add the Panorama Viewer widget to your project.

import 'package:panorama_viewer/panorama_viewer.dart';
... ...
  
@override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: PanoramaViewer(
          child: Image.asset('assets/panorama360.jpg'),
        ),
      ),
    );
  }

Migration from the Panorama package

  • In the dependencies, use panorama_viewer instead of panorama.
  • In the Dart files where you use panorama, change the import to: import 'package:panorama_viewer/panorama_viewer.dart';.
  • Change the widget name from Panorama to PanoramaViewer.
  • If you've used SensorControl, change SensorControl.Orientation to SensorControl.orientation. All constant names are now in lower camel case, following the latest Dart best practices.

Web implementation

On the web, sensors are not utilized because the sensor library used is only compatible with iOS and Android devices. Additionally, on some Android devices, if the panoramic image is too large, nothing is displayed. When checking the console log remotely, you may encounter WebGL errors or warnings.

所属分类

依赖

依赖清单 2 项

源码仓库

使用此插件的项目

暂无相关数据。