패키지, 저장소 및 앱 카테고리 검색

any_image_view 표지
패키지 상세v2.5.0

any_image_view

PNG, JPG, WebP, GIF, TIFF, RAW, SVG, Lottie, XFile 및 네트워크 이미지를 지원하는 유연한 Flutter 이미지 뷰어로 최고의 해상도를 제공합니다. 모든 기능이 하나의 원활한 패키지에 통합되어 있습니다.

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를 지원하며 원활한 통합을 위해 설계되어 유연하고 신뢰할 수 있는 이미지 처리가 필요한 앱에 이상적입니다.

사용 사례

  • 단일 위젯에서 다양한 이미지 형식 표시
  • 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

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트