diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a0564b..f707772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.6.1] - 2022-05-15 +### Changed +- Fixed an issue where an empty ImageFade (no placeholder) could cause errors in some layouts + ## [0.6.0] - 2022-05-14 ### Added - Added `syncDuration` — if specified will be used for fading in placeholder, error, and synchronously loaded images diff --git a/README.md b/README.md index bf30753..0e301e0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ImageFade -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. Fade uses `Image.opacity` when appropriate for improved performance. +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. It uses `Image.opacity` when appropriate for improved performance. If `image` is changed, it will cross-fade to the new image once it is finished loading. Setting `image` to `null` will cross-fade back to the placeholder. @@ -9,8 +9,8 @@ If `image` is changed, it will cross-fade to the new image once it is finished l You can set `duration` and `curve`, as well as most `Image` properties: `width`, `height`, `fit`, `alignment`, `repeat`, `matchTextDirection`, `excludeFromSemantics` and `semanticLabel`. -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. Lastly, the optional `syncDuration` is used when -fading in a synchronously loaded image, error, or placeholder. +Use `loadingBuilder` and `errorBuilder` to display load progress or error states. Optionally specify `syncDuration` to +use a different (usually faster) duration for fading in a synchronously loaded image, error, or placeholder. ``` dart ImageFade( @@ -47,9 +47,11 @@ ImageFade( ) ``` +## Image Caching +ImageFade is compatible with `CachedNetworkImageProvider`. ## Installing The published version of this package is [availble on pub.dev](https://pub.dev/packages/image_fade). ## Example -See the example directory for a simple example. +See the example directory for a simple example. \ No newline at end of file diff --git a/example/pubspec.lock b/example/pubspec.lock index 523f4a0..3a027fa 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -80,7 +80,7 @@ packages: path: ".." relative: true source: path - version: "0.6.0" + version: "0.6.1" lints: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 4351d3f..7c68480 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,9 +1,9 @@ name: image_fade -description: A widget that displays a placeholder and optional progress indicator while an image loads, then cross-fades to the loaded image. Improves on FadeInImage. +description: A widget that displays a placeholder and optional progress indicator while an image loads, then cross-fades to the loaded image. Improves on FadeInImage. Compatible with CachedNetworkImageProvider. repository: https://github.com/gskinner/image_fade homepage: https://github.com/gskinner/image_fade -version: 0.6.0 +version: 0.6.1 environment: sdk: ">=2.13.4 <3.0.0"