diff --git a/packages/flutter/lib/src/animation/animation_controller.dart b/packages/flutter/lib/src/animation/animation_controller.dart index 95f2f75dea..84be9c4254 100644 --- a/packages/flutter/lib/src/animation/animation_controller.dart +++ b/packages/flutter/lib/src/animation/animation_controller.dart @@ -507,6 +507,10 @@ class AnimationController extends Animation /// regardless of whether `target` > [value] or not. At the end of the /// animation, when `target` is reached, [status] is reported as /// [AnimationStatus.completed]. + /// + /// If the `target` argument is the same as the current [value] of the + /// animation, then this won't animate, and the returned [TickerFuture] will + /// be already complete. TickerFuture animateTo(double target, { Duration? duration, Curve curve = Curves.linear }) { assert(() { if (this.duration == null && duration == null) { diff --git a/packages/flutter/lib/src/painting/binding.dart b/packages/flutter/lib/src/painting/binding.dart index 1dff620c8f..6f5c449a6c 100644 --- a/packages/flutter/lib/src/painting/binding.dart +++ b/packages/flutter/lib/src/painting/binding.dart @@ -68,7 +68,7 @@ mixin PaintingBinding on BindingBase, ServicesBinding { @protected ImageCache createImageCache() => ImageCache(); - /// Calls through to [dart:ui] from [ImageCache]. + /// Calls through to [dart:ui.instantiateImageCodec] from [ImageCache]. /// /// The `cacheWidth` and `cacheHeight` parameters, when specified, indicate /// the size to decode the image to. diff --git a/packages/flutter/lib/src/painting/image_provider.dart b/packages/flutter/lib/src/painting/image_provider.dart index 2a06f71e92..8425b9cb36 100644 --- a/packages/flutter/lib/src/painting/image_provider.dart +++ b/packages/flutter/lib/src/painting/image_provider.dart @@ -928,9 +928,21 @@ class MemoryImage extends ImageProvider { assert(scale != null); /// The bytes to decode into an image. + /// + /// The bytes represent encoded image bytes and can be encoded in any of the + /// following supported image formats: {@macro flutter.dart:ui.imageFormats} + /// + /// See also: + /// + /// * [PaintingBinding.instantiateImageCodec] final Uint8List bytes; /// The scale to place in the [ImageInfo] object of the image. + /// + /// See also: + /// + /// * [ImageInfo.scale], which gives more information on how this scale is + /// applied. final double scale; @override diff --git a/packages/flutter/lib/src/painting/image_stream.dart b/packages/flutter/lib/src/painting/image_stream.dart index a37381e027..cc006758f1 100644 --- a/packages/flutter/lib/src/painting/image_stream.dart +++ b/packages/flutter/lib/src/painting/image_stream.dart @@ -105,11 +105,13 @@ class ImageInfo { /// /// The scale factor applies to the width and the height. /// - /// For example, if this is 2.0 it means that there are four image pixels for + /// {@template flutter.painting.imageInfo.scale} + /// For example, if this is 2.0, it means that there are four image pixels for /// every one logical pixel, and the image's actual width and height (as given /// by the [dart:ui.Image.width] and [dart:ui.Image.height] properties) are /// double the height and width that should be used when painting the image /// (e.g. in the arguments given to [Canvas.drawImage]). + /// {@endtemplate} final double scale; /// A string used for debugging purposes to identify the source of this image. diff --git a/packages/flutter/lib/src/scheduler/ticker.dart b/packages/flutter/lib/src/scheduler/ticker.dart index 1e8fa74947..e88a5b068b 100644 --- a/packages/flutter/lib/src/scheduler/ticker.dart +++ b/packages/flutter/lib/src/scheduler/ticker.dart @@ -296,6 +296,14 @@ class Ticker { /// Release the resources used by this object. The object is no longer usable /// after this method is called. + /// + /// It is legal to call this method while [isActive] is true, in which case: + /// + /// * The frame callback that was requested by [scheduleTick], if any, is + /// canceled. + /// * The future that was returned by [start] does not resolve. + /// * The future obtained from [TickerFuture.orCancel], if any, resolves + /// with a [TickerCanceled] error. @mustCallSuper void dispose() { if (_future != null) { diff --git a/packages/flutter/lib/src/widgets/image.dart b/packages/flutter/lib/src/widgets/image.dart index 6cabae7523..c225f6f098 100644 --- a/packages/flutter/lib/src/widgets/image.dart +++ b/packages/flutter/lib/src/widgets/image.dart @@ -649,7 +649,15 @@ class Image extends StatefulWidget { /// Creates a widget that displays an [ImageStream] obtained from a [Uint8List]. /// - /// The [bytes], [scale], and [repeat] arguments must not be null. + /// The `bytes` argument specifies encoded image bytes, which can be encoded + /// in any of the following supported image formats: + /// {@macro flutter.dart:ui.imageFormats} + /// + /// 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} + /// + /// The `bytes`, `scale`, and [repeat] arguments must not be null. /// /// This only accepts compressed image formats (e.g. PNG). Uncompressed /// formats like rawRgba (the default format of [dart:ui.Image.toByteData])