Document the scale argument to NetworkImage (#137456)

Add docs to NetworkImage constructor
This commit is contained in:
Todd Volkert 2023-10-31 16:15:07 -07:00 committed by GitHub
parent ad13cbd065
commit 5160c5e184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1399,6 +1399,9 @@ class ResizeImage extends ImageProvider<ResizeImageKey> {
// 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.
abstract class NetworkImage extends ImageProvider<NetworkImage> { abstract class NetworkImage extends ImageProvider<NetworkImage> {
/// Creates an object that fetches the image at the given URL. /// Creates an object that fetches the image at the given URL.
///
/// The [scale] argument is the linear scale factor for drawing this image at
/// its intended size. See [ImageInfo.scale] for more information.
const factory NetworkImage(String url, { double scale, Map<String, String>? headers }) = network_image.NetworkImage; const factory NetworkImage(String url, { double scale, Map<String, String>? headers }) = network_image.NetworkImage;
/// The URL from which the image will be fetched. /// The URL from which the image will be fetched.