Search categories, packages and repositories

progressive_image cover
Package detailsv2.0.1

progressive_image

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

AndroidiOSWebmacOSWindowsLinux
30-day downloads
1.1K
Likes
390
Pub points
150

Install package

flutter pub add progressive_image

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

ProgressiveImage is a Flutter widget that enhances image loading performance by displaying a low-quality placeholder image first, which gradually improves in quality as the full-resolution image loads. This technique reduces perceived load time and improves user experience, especially on slower networks. The package supports multiple platforms including Android, iOS, Web, macOS, Windows, and Linux, making it versatile for cross-platform applications. It integrates seamlessly with existing image loading workflows and works well with popular image providers like NetworkImage.

Use cases

  • Improving perceived performance of image-heavy apps
  • Enhancing UX on slow network connections
  • Displaying high-resolution images with smooth transitions
  • Loading large images in galleries or feeds
  • Optimizing image loading in e-commerce apps

Key features

  • Low Quality Image Placeholder (LQIP) support
  • Smooth progressive image rendering
  • Cross-platform compatibility
  • Easy integration with existing image loaders
  • Supports network and local image sources

Suitable for

  • Apps with many high-resolution images
  • User interfaces prioritizing smooth loading experiences
  • Developers seeking improved visual feedback during image loading
  • Projects targeting multiple platforms
  • Performance-conscious mobile and web applications

Considerations

  • Requires a suitable low-quality placeholder image
  • May increase initial memory usage slightly
  • Not ideal for very small images where LQIP benefits are minimal
  • Depends on proper image asset management
  • Best used with images that have significant size differences between preview and final versions

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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,
            ),
        );
    }
}

Categories

Source repository

Projects using this package

No data available yet.