搜索插件、代码仓与 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 项

源码仓库

使用此插件的项目

暂无相关数据。