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.
[0.2.1] - 2019-09-02
- Now using
Opacityfor better performance.
[0.2.0] - 2019-07-29
- Support for error handling via
placeholdernow accepts a
Widgetinstead of an
- previously loaded images are now faded out after the new image is faded in. Noticeable when a smaller image is loaded over a larger one.
backgroundColorwas removed. Use a
placeholderwith a color instead.
[0.1.0] - 2019-07-23
- First release.
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.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: image_fade: ^0.2.1
2. Install it
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.
3. Import it
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 Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.5.1
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.4
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
flutter format to format