搜尋套件、儲存庫與 APP 分類

photox 封面
套件詳情v0.2.1

photox

用於顯示互動式圖像的全方位解決方案。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
52
喜歡數
7
Pub 分數
120

安裝套件

flutter pub add photox

套件介紹

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

PhotoX 是一個全面的 Flutter 套件,專為在多個平台間無縫顯示和互動圖像而設計。它內建支援縮放、平移和觸控手勢,非常適合用於相簿、影像檢視器以及互動式視覺內容。著重於效能與易於整合,PhotoX 簡化了豐富影像體驗的實作,無需複雜的自訂程式碼。此套件持續維護,並相容於 Android、iOS、Web、macOS、Windows 與 Linux。

適用情境

  • 互動式圖像檢視
  • 照片畫廊應用
  • 可縮放圖像顯示
  • 數位藝術展示
  • 圖像標註工具

主要特色

  • 基於手勢的縮放和平移
  • 跨平台相容性
  • 高性能渲染
  • 簡單 API 結合
  • 支援大圖像
  • 響應式設計

適合對象

  • 開發圖像密集型應用的開發者
  • 需要快速圖像互動功能的團隊
  • 需要多平台圖像支援的專案
  • 教育或創意應用

使用建議

  • 可能需要對極高解析度的影像進行優化
  • 對高級UI元素的自訂有限
  • 依賴於 Flutter 的渲染管道
  • 最適合靜態或半互動式圖像
  • 不適合即時影像編輯

原始 README

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

PhotoX

An all-in-one solution for displaying interactive images

   

Features

  • Smoothly animate images into fullscreen and back
  • Swipe to dismiss images
  • Pinch to zoom
  • Automatically generate swipeable gallery when given multiple images

Getting started

Add photox as a dependency in your pubspec.yaml file

flutter pub add photox

Import PhotoX:

import 'package:photox/photox.dart';

Usage

@override
Widget build(BuildContext context) {
  return Container(
    height: 400,
    width: 400,
    child: PhotoX(
      items: [
        PhotoXItem(
          id: "1", resource: "assets/img1.jpg", isAsset: true),
        PhotoXItem(
          id: "2", resource: "assets/img2.jpeg", isAsset: true),
      ]
    )
  );
}

Additional parameters

dismissMode
DismissMode.swipeAny DismissMode.swipeVertical

⚠️ DismissMode.swipeAny can only be used when provided with a single PhotoXItem

showPageIndicator

Whether to show the page indicator in the thumbnail gallery for multiple PhotoXItems

pageIndicatorAlignment

The alignment of the page indicator relative to the gallery

pageIndicatorActiveColor

The color of the active bubble in the page indicator

pageIndicatorInactiveColor

The color of the inactive bubbles in the page indicator

pageIndicatorBackgroundColor

The background color of the page indicator

pageIndicatorBubbleRadius

The radius of the indicator bubbles in the page indicator

pageIndicatorBubblePadding

The padding between the bubbles in the page indicator

fullscreenGalleryTitleTextStyle

The TextStyle for the AppBar title in the fullscreen gallery

fullscreenGalleryAppBarLeadingWidget

A custom widget to use as the leading widget in the fullscreen gallery AppBar

所屬分類

依賴

依賴清單 3 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。