パッケージ、リポジトリ、アプリカテゴリを検索

any_image_view のカバー
パッケージ詳細v2.5.0

any_image_view

PNG、JPG、WebP、GIF、TIFF、RAW、SVG、Lottie、XFile、ネットワーク画像をサポートする、高解像度で使いやすいFlutter用画像ビューアー。すべてを1つのシームレスなパッケージに統合しています。

AndroidiOSmacOSWindowsLinux
30日間ダウンロード
649
いいね数
100
Pub ポイント
160

パッケージをインストール

flutter pub add any_image_view

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

AnyImageViewは、PNG、JPG、WebP、GIF、TIFF、RAW、SVG、Lottieを含むさまざまな画像形式およびネットワーク画像やXFile画像の表示を簡素化する包括的なFlutterパッケージです。解像度最適化とプラットフォーム間のレンダリングを自動的に処理し、追加の設定なしに高品質な表示を保証します。シームレスな統合を目的としており、Android、iOS、macOS、Windows、Linuxをサポートしており、柔軟かつ信頼性の高い画像処理が必要なアプリに最適です。

用途

  • 1つのウィジェットにさまざまな画像形式を表示する
  • URLおよびローカルファイルから画像を読み込む
  • GIF や Lottie などのアニメーション画像をサポート
  • SVG などのベクターグラフィックスのレンダリング
  • 生の高解像度画像の取り扱い
  • メディアギャラリーまたは画像中心のアプリの構築

主な機能

  • 複数の画像形式をサポートしています(PNG、JPG、WebP、GIF、TIFF、RAW、SVG、Lottie)
  • 自動解像度最適化
  • ネットワークおよびXFileソースを処理
  • クロスプラットフォーム互換性
  • 最小限のセットアップで簡単なAPI
  • 組み込みキャッシュとエラー処理

適している対象

  • メディア豊富なアプリケーションを開発する開発者
  • アニメーションまたはベクター画像のサポートを必要とするアプリ
  • 複数プラットフォーム間で一貫した画像レンダリングが必要なプロジェクト
  • 画像表示の統合ソリューションを求めるチーム
  • さまざまな画像ソースを持つプロトタイプまたは生産アプリ

注意事項

  • 含まれるフォーマットデコーダーにより、アプリのサイズが増加する可能性があります
  • 大規模または複雑なアニメーションによってパフォーマンスが異なる場合があります
  • 長い画像リストには、慎重なメモリ管理が必要です
  • 高度な画像処理のカスタマイズが限られている
  • 画像の編集や変換には適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

any_image_view

Pub Version License

Any Image View

Show any image with one widget. Network, asset, file, XFile, SVG or Lottie: hand it to AnyImageView and it takes care of loading, caching, retries and errors. Zero dependencies.

Install

dependencies:
  any_image_view: ^2.5.0
import 'package:any_image_view/any_image_view.dart';

Usage

// Network (cached on disk after the first load)
AnyImageView(imagePath: 'https://example.com/photo.jpg', height: 200, width: 200)

// Asset
AnyImageView(imagePath: 'assets/photo.png', height: 200, width: 200)

// SVG, asset or network, optionally tinted
AnyImageView(imagePath: 'assets/icon.svg', height: 40, width: 40, svgColor: Colors.blue)

// Lottie, loops automatically
AnyImageView(imagePath: 'assets/loader.json', height: 120, width: 120)

// Local file or image_picker result
AnyImageView(imagePath: '/path/to/photo.jpg', height: 200, width: 200)
AnyImageView(imagePath: pickedXFile, height: 200, width: 200)

// Circular avatar
AnyImageView(imagePath: url, height: 80, width: 80, shape: BoxShape.circle)

// Tap for a fullscreen viewer with pan, pinch and double-tap zoom
AnyImageView(imagePath: url, height: 200, width: 200, enableFullscreen: true)

// Styling and custom states
AnyImageView(
  imagePath: url,
  height: 200,
  width: 300,
  fit: BoxFit.cover,
  borderRadius: BorderRadius.circular(16),
  placeholderWidget: const CircularProgressIndicator(),
  errorWidget: const Icon(Icons.broken_image),
)

Supported formats

Type Formats
Raster PNG, JPG, WebP, GIF, BMP, ICO
Platform-decoded AVIF, HEIC on Android 12+, iOS 16+, macOS 13+ and web
Vector SVG
Animation Lottie .json, .zip, .lottie
Sources Network URL, asset, file path, file:// URI, XFile, File

The source is detected from the path. Matching is case-insensitive and ignores query strings and fragments.

Parameters

Parameter Type Default Purpose
imagePath Object? URL, asset path, file path, XFile or File
height, width double? Size
fit BoxFit? cover How the image fills the box (contain for SVG and Lottie)
alignment Alignment? Alignment inside the container
shape BoxShape rectangle rectangle or circle
borderRadius BorderRadius? Rounded corners
border BoxBorder? Border
boxShadow List<BoxShadow>? Shadows
margin, padding EdgeInsetsGeometry? Outer and inner spacing
placeholderWidget Widget? shimmer Shown while loading
errorWidget Widget? broken-image icon Shown on failure
fadeDuration Duration 400 ms Fade-in
maxRetryAttempts int 3 Retries after a failed network load; 0 disables
httpHeaders Map<String, String>? Headers for network requests
enableZoom bool false Inline pinch-to-zoom
enableFullscreen bool false Tap opens a fullscreen viewer
onTap VoidCallback? Custom tap handler
svgColor Color? Tint for SVGs
svgColorFilter ColorFilter? Custom SVG color filter

Screenshots

Network, PNG, SVG AVIF Lottie, avatar, error Fullscreen
Network image, PNG and SVG AVIF asset and network AVIF Lottie, circular avatar and error widget Fullscreen viewer

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト