분류, 패키지 및 저장소 검색

progressive_image 표지
패키지 상세v2.0.1

progressive_image

낮은 품질의 이미지 플레이스홀더를 사용하여 점진적으로 큰 이미지를 로드하는 Flutter 위젯입니다.

AndroidiOSWebmacOSWindowsLinux
30일 다운로드
1.1천
좋아요
390
Pub 점수
150

패키지 설치

flutter pub add progressive_image

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

ProgressiveImage는 전체 해상도 이미지가 로드되는 동안 품질이 점차 향상되는 저품질 플레이스홀더 이미지를 먼저 표시함으로써 이미지 로딩 성능을 향상시키는 Flutter 위젯입니다. 이 기술은 인식된 로딩 시간을 줄이고, 특히 느린 네트워크에서 사용자 경험을 개선합니다. 패키지는 Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 크로스플랫폼 애플리케이션에 유연하게 활용할 수 있습니다. 기존의 이미지 로딩 워크플로우와 원활하게 통합되며, NetworkImage와 같은 인기 있는 이미지 제공자와 잘 작동합니다.

사용 사례

  • 이미지가 많은 앱의 인식 성능 향상
  • 느린 네트워크 연결에서 UX 향상
  • 고해상도 이미지를 부드러운 전환 효과로 표시
  • 갤러리나 피드에서 큰 이미지 로딩
  • 전자상거래 앱에서 이미지 로딩 최적화

주요 기능

  • 저품질 이미지 플레이스홀더 (LQIP) 지원
  • 스무딩 프로그레시브 이미지 렌더링
  • 크로스 플랫폼 호환성
  • 기존 이미지 로더와의 간편한 통합
  • 네트워크 및 로컬 이미지 소스를 지원합니다

적합한 대상

  • 고해상도 이미지가 많은 앱
  • 부드러운 로딩 경험을 우선시하는 사용자 인터페이스
  • 이미지 로딩 중 개선된 시각적 피드백을 원하는 개발자
  • 다중 플랫폼 대상 프로젝트
  • 성능 중심의 모바일 및 웹 애플리케이션

고려 사항

  • 적절한 저품질 플레이스홀더 이미지가 필요합니다
  • 초기 메모리 사용량이 약간 증가할 수 있습니다
  • 매우 작은 이미지에서는 LQIP의 이점이 미미하므로 이상적이지 않음
  • 적절한 이미지 자산 관리에 의존함
  • 미리보기 버전과 최종 버전 사이에 크기 차이가 크게 나는 이미지와 함께 사용하는 것이 가장 좋습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Progressive Image

A flutter widget which progressively loads large images using Low Quality Image Placeholders.

Snapshots

Features

  • Displays placeholder and thumbnail image until the target Image loads.
  • Smooth Fade-in animations for preventing immediate image popups on load.
  • Blur effect for low resolution thumbnail to prevent the pixelated view.
  • Effectively resolves thumbnail image before the target image starts to fetch for quick first impression.
  • Placeholder widgets instead of placeholder images can now be added in v2.0.0

Installing

Following steps will help you add this library as a dependency in your flutter project.

  • In the pubspec.yaml file in the root of your project
dependencies:
  progressive_image: ^2.0.0
  • Run the following command to get packages:
$ flutter packages get
  • Import the package in your project file:
import 'package:progressive_image/progressive_image.dart';

Usage

For a more detailed look at how to use this library, there is a sweet project in the example directory and various examples can be found here

A simple example usage of the ProgressiveImage widget is shown below:

import 'package:flutter/material.dart';
import 'package:progressive_image/progressive_image.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('Progressive Image Example')),
        body: ProgressiveImageExample(),
      ),
    );
  }
}

class ProgressiveImageExample extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
        return Container(
            child: ProgressiveImage(
                placeholder: AssetImage('assets/placeholder.jpg'),
                // size: 1.87KB
                thumbnail: NetworkImage('https://i.imgur.com/7XL923M.jpg'),
                // size: 1.29MB
                image: NetworkImage('https://i.imgur.com/xVS07vQ.jpg'),
                height: 300,
                width: 500,
            ),
        );
    }
}

카테고리

소스 저장소

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

아직 데이터가 없습니다.