Unverified Commit 5fe32098 authored by xster's avatar xster Committed by GitHub

reverse doc from image providers back to image shorthands (#13074)

parent 9186ba0f
...@@ -390,6 +390,10 @@ abstract class AssetBundleImageProvider extends ImageProvider<AssetBundleImageKe ...@@ -390,6 +390,10 @@ abstract class AssetBundleImageProvider extends ImageProvider<AssetBundleImageKe
/// Fetches the given URL from the network, associating it with the given scale. /// Fetches the given URL from the network, associating it with the given scale.
/// ///
/// The image will be cached regardless of cache headers from the server. /// The image will be cached regardless of cache headers from the server.
///
/// See also:
///
/// * [Image.network] for a shorthand of an [Image] widget backed by [NetworkImage].
// TODO(ianh): Find some way to honour cache headers to the extent that when the // TODO(ianh): Find some way to honour cache headers to the extent that when the
// last reference to an image is released, we proactively evict the image from // last reference to an image is released, we proactively evict the image from
// our cache if the headers describe the image as having expired at that point. // our cache if the headers describe the image as having expired at that point.
...@@ -459,6 +463,10 @@ class NetworkImage extends ImageProvider<NetworkImage> { ...@@ -459,6 +463,10 @@ class NetworkImage extends ImageProvider<NetworkImage> {
/// Decodes the given [File] object as an image, associating it with the given /// Decodes the given [File] object as an image, associating it with the given
/// scale. /// scale.
///
/// See also:
///
/// * [Image.file] for a shorthand of an [Image] widget backed by [FileImage].
class FileImage extends ImageProvider<FileImage> { class FileImage extends ImageProvider<FileImage> {
/// Creates an object that decodes a [File] as an image. /// Creates an object that decodes a [File] as an image.
/// ///
...@@ -523,6 +531,10 @@ class FileImage extends ImageProvider<FileImage> { ...@@ -523,6 +531,10 @@ class FileImage extends ImageProvider<FileImage> {
/// that changes over time, consider creating a new subclass of [ImageProvider] /// that changes over time, consider creating a new subclass of [ImageProvider]
/// whose [load] method returns a subclass of [ImageStreamCompleter] that can /// whose [load] method returns a subclass of [ImageStreamCompleter] that can
/// handle providing multiple images. /// handle providing multiple images.
///
/// See also:
///
/// * [Image.memory] for a shorthand of an [Image] widget backed by [MemoryImage].
class MemoryImage extends ImageProvider<MemoryImage> { class MemoryImage extends ImageProvider<MemoryImage> {
/// Creates an object that decodes a [Uint8List] buffer as an image. /// Creates an object that decodes a [Uint8List] buffer as an image.
/// ///
...@@ -638,6 +650,10 @@ class MemoryImage extends ImageProvider<MemoryImage> { ...@@ -638,6 +650,10 @@ class MemoryImage extends ImageProvider<MemoryImage> {
/// Note that the `lib/` is implied, so it should not be included in the asset /// Note that the `lib/` is implied, so it should not be included in the asset
/// path. /// path.
/// ///
/// See also:
///
/// * [Image.asset] for a shorthand of an [Image] widget backed by
/// [ExactAssetImage] when using a scale.
class ExactAssetImage extends AssetBundleImageProvider { class ExactAssetImage extends AssetBundleImageProvider {
/// Creates an object that fetches the given image from an asset bundle. /// Creates an object that fetches the given image from an asset bundle.
/// ///
......
...@@ -113,6 +113,10 @@ const String _kAssetManifestFileName = 'AssetManifest.json'; ...@@ -113,6 +113,10 @@ const String _kAssetManifestFileName = 'AssetManifest.json';
/// Note that the `lib/` is implied, so it should not be included in the asset /// Note that the `lib/` is implied, so it should not be included in the asset
/// path. /// path.
/// ///
/// See also:
///
/// * [Image.asset] for a shorthand of an [Image] widget backed by [AssetImage]
/// when used without a scale.
class AssetImage extends AssetBundleImageProvider { class AssetImage extends AssetBundleImageProvider {
/// Creates an object that fetches an image from an asset bundle. /// Creates an object that fetches an image from an asset bundle.
/// ///
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment