搜尋分類、套件與程式碼儲存庫

imageview360 封面
套件詳情v1.3.0

imageview360

一個 Flutter 套件,提供影像的 360 度檢視,支援旋轉與手勢自訂。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
145
喜歡數
198
Pub 分數
150

安裝套件

flutter pub add imageview360

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

imageview360 是一個 Flutter 套件,可實現沉浸式 360 度影像觀看,支援平滑旋轉與自訂手勢。使用者可透過滑動或拖曳探索全景影像,非常適合虛擬導覽、產品展示與互動媒體。此套件支援 Android、iOS、Web、macOS、Windows 與 Linux 多個平台,確保廣泛相容性。開發者可細調旋轉速度、敏感度與互動行為,以符合應用程式設計。該套件著重於效能與易用性,能順暢整合至 Flutter 應用程式中。

適用情境

  • 虛擬現實體驗
  • 產品可視化
  • 互動式照片畫廊
  • 教育類360內容
  • 房地產看房

主要特色

  • 順暢的360度旋轉
  • 可自訂手勢控制
  • 跨平台支援
  • 高性能渲染
  • 可設定的旋轉速度
  • 響應式觸控互動

適合對象

  • 需要沉浸式圖像探索的應用
  • 支援3D產品視圖的電商平台
  • 旅行和旅遊應用
  • 帶有全景內容的教育工具
  • 互動敘事應用

使用建議

  • 需要高解析度源影像
  • 可能影響低端裝置的效能
  • 僅限靜態360影像(不支援影片)
  • 初始設定可能需要圖像預處理
  • 手勢自訂需要熟悉 Flutter 輸入處理

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

imageview360

A Flutter package which provides 360 view of the images with rotation and gesture customisations.

Supported Dart Versions

Dart SDK version >= 2.12.0

Demo Gif

imageview360 Demo

Installation

Pub

Add the Package

dependencies:
  imageview360: ^1.2.0

How to use

Import the package in your dart file

import 'package:imageview360/imageview360.dart';

Basic usage :
ImageView360(
     key: UniqueKey(),
     imageList: imageList,
),

Note: For ImageView360 to show instant changes on hot reload, you need to provide UniqueKey() so that the widget rebuilds every time.

Customisable usage :
ImageView360(
    key: UniqueKey(),                                           
    imageList: imageList,                                       
    autoRotate: true,                                           //Optional
    rotationCount: 2,                                           //Optional
    rotationDirection: RotationDirection.anticlockwise,         //Optional
    frameChangeDuration: Duration(milliseconds: 50),            //Optional
    swipeSensitivity: 2,                                        //Optional
    allowSwipeToRotate: true,                                   //Optional
    onImageIndexChanged: (currentImageIndex) {                  //Optional
                          print("currentImageIndex: $currentImageIndex");
                        },
)

Note: For better experience always precache image before providing the images to the widget as follows.

Example for loading and precaching images from assets :
 List<ImageProvider> imageList = List<ImageProvider>();
   for (int i = 1; i <= 52; i++) {
      imageList.add(AssetImage('assets/sample/$i.png'));
// To precache images so that when required they are loaded faster.
      await precacheImage(AssetImage('assets/sample/$i.png'), context);
    }
Mandatory fields
Attribute Type Usage
imageList List The list of images to be displayed
Customisable fields
Attribute Type Default Value
autoRotate bool false
rotationCount int 1
rotationDirection RotationDirection RotationDirection.clockwise
frameChangeDuration Duration Duration(milliseconds: 80)
swipeSensitivity int 1 (Note : Range allowed is 1-5 , less than 1 would be considered 1 and more than 5 would be considered 5)
allowSwipeToRotate bool true
onImageIndexChanged Function(int) (currentImageIndex){}

Blog Post

To have a better understanding how this package works under the hood, checkout my blog post: 360 degree image showcase in Flutter

Created & Maintained By

Harpreet Singh

Damanpreet Singh

License

Copyright 2020 Harpreet Singh & Damanpreet Singh

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。