diff --git a/packages/flutter/lib/src/widgets/basic.dart b/packages/flutter/lib/src/widgets/basic.dart index 49676bcf8c..3eb41334e5 100644 --- a/packages/flutter/lib/src/widgets/basic.dart +++ b/packages/flutter/lib/src/widgets/basic.dart @@ -5957,6 +5957,10 @@ class RichText extends MultiChildRenderObjectWidget { /// expected to call [dart:ui.Image.dispose] on the [image] once the [RawImage] /// is no longer buildable. /// +/// The `scale` argument specifies the linear scale factor for drawing this +/// image at its intended size and applies to both the width and the height. +/// {@macro flutter.painting.imageInfo.scale} +/// /// This widget is rarely used directly. Instead, consider using [Image]. class RawImage extends LeafRenderObjectWidget { /// Creates a widget that displays an image. @@ -6005,9 +6009,11 @@ class RawImage extends LeafRenderObjectWidget { /// aspect ratio. final double? height; - /// Specifies the image's scale. + /// The linear scale factor for drawing this image at its intended size. /// - /// Used when determining the best display size for the image. + /// The scale factor applies to the width and the height. + /// + /// {@macro flutter.painting.imageInfo.scale} final double scale; /// If non-null, this color is blended with each image pixel using [colorBlendMode]. diff --git a/packages/flutter/lib/src/widgets/image.dart b/packages/flutter/lib/src/widgets/image.dart index 5e61b391bc..85faacd8ed 100644 --- a/packages/flutter/lib/src/widgets/image.dart +++ b/packages/flutter/lib/src/widgets/image.dart @@ -339,6 +339,10 @@ class Image extends StatefulWidget { /// To show an image from the network or from an asset bundle, consider using /// [Image.network] and [Image.asset] respectively. /// + /// The `scale` argument specifies the linear scale factor for drawing this + /// image at its intended size and applies to both the width and the height. + /// {@macro flutter.painting.imageInfo.scale} + /// /// Either the [width] and [height] arguments should be specified, or the /// widget should be placed in a context that sets tight layout constraints. /// Otherwise, the image dimensions will change as the image is loaded, which @@ -379,6 +383,10 @@ class Image extends StatefulWidget { /// Otherwise, the image dimensions will change as the image is loaded, which /// will result in ugly layout changes. /// + /// The `scale` argument specifies the linear scale factor for drawing this + /// image at its intended size and applies to both the width and the height. + /// {@macro flutter.painting.imageInfo.scale} + /// /// All network images are cached regardless of HTTP headers. /// /// An optional [headers] argument can be used to send custom HTTP headers @@ -428,6 +436,10 @@ class Image extends StatefulWidget { /// Creates a widget that displays an [ImageStream] obtained from a [File]. /// + /// The `scale` argument specifies the linear scale factor for drawing this + /// image at its intended size and applies to both the width and the height. + /// {@macro flutter.painting.imageInfo.scale} + /// /// Either the [width] and [height] arguments should be specified, or the /// widget should be placed in a context that sets tight layout constraints. /// Otherwise, the image dimensions will change as the image is loaded, which @@ -508,6 +520,10 @@ class Image extends StatefulWidget { /// If the `bundle` argument is omitted or null, then the /// [DefaultAssetBundle] will be used. /// + /// The `scale` argument specifies the linear scale factor for drawing this + /// image at its intended size and applies to both the width and the height. + /// {@macro flutter.painting.imageInfo.scale} + /// /// By default, the pixel-density-aware asset resolution will be attempted. In /// addition: ///