Requires Flutter 1.6.7 or higher.
A widget for Flutter that displays a
placeholder widget while a specified
image loads, then cross-fades to the loaded image. Also handles progress and errors.
image is changed, it will cross-fade to the new image once it is finished loading. Setting
null will cross-fade back to the placeholder.
You can set
fadeCurve, as well as most
You can also specify a
loadingBuilder that will display load progress any time a new image is loaded, and an
errorBuilder that will display if an error occurs while loading an image.
See the example directory for a simple example.
All notable changes to this project will be documented in this file.
placeholdernow accepts a
Widgetinstead of an
backgroundColorwas removed. Use a
placeholderwith a color instead.
Demonstrates the core features of the
> button sets the
image property to a new
NetworkImage (loading from WikiMedia Commons).
x button sets
/!\ button sets
image to a non-existent image url, demonstrating an error.
Add this to your package's pubspec.yaml file:
dependencies: image_fade: ^0.2.0
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Aug 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
lib/image_fade.dart. (-0.50 points)
lib/image_fade.dart reported 1 hint:
line 3 col 8: Unused import: 'dart:math'.