FLUTTER ECOSYSTEM

dariocavada/panorama_viewer

全景查看器 - Flutter 小部件

全景查看器 项目封面
Stars
12
Forks
7
最近推送(UTC)
2025年8月13日
项目状态
未归档
Dario Cavada GitHub avatar
GITHUB User

Dario Cavada ↗

语言DartC++CMakeRubyCSwiftHTMLKotlinObjective-C

此仓库发布的插件

使用的依赖

依赖清单 5 项
  • flutter{"sdk":"flutter"}
  • flutter_cube^0.1.1
  • dchs_motion_sensors^2.0.1
  • flutter_test开发依赖{"sdk":"flutter"}
  • flutter_lints开发依赖^5.0.0

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 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.