Small fixes to Image docs: NNBD, and add a cross-reference (#151938)

In particular, without this cross-reference it's easy for a reader
looking at [Image.frameBuilder] to think that the meanings of these
parameters just aren't properly documented.  (I had that thought for
a minute, before thinking *surely* they're documented, and then
trying the link to the typedef.)
This commit is contained in:
Greg Price 2024-07-18 09:22:16 -07:00 committed by GitHub
parent 36dac294e9
commit caaff4b9b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -152,8 +152,8 @@ Future<void> precacheImage(
/// Signature used by [Image.frameBuilder] to control the widget that will be
/// used when an [Image] is built.
///
/// The `child` argument contains the default image widget and is guaranteed to
/// be non-null. Typically, this builder will wrap the `child` widget in some
/// The `child` argument contains the default image widget.
/// Typically, this builder will wrap the `child` widget in some
/// way and return the wrapped widget. If this builder returns `child` directly,
/// it will yield the same result as if [Image.frameBuilder] was null.
///
@ -174,8 +174,6 @@ Future<void> precacheImage(
/// frames. In other words, if the first image frame was available immediately,
/// then this argument will be true for all image frames.
///
/// This builder must not return null.
///
/// See also:
///
/// * [Image.frameBuilder], which makes use of this signature in the [Image]
@ -212,8 +210,6 @@ typedef ImageFrameBuilder = Widget Function(
/// In such cases, the `child` parameter will represent the current
/// fully-loaded image frame.
///
/// This builder must not return null.
///
/// See also:
///
/// * [Image.loadingBuilder], which makes use of this signature in the [Image]
@ -712,6 +708,9 @@ class Image extends StatefulWidget {
/// add effects to the image (such as fading the image in when it becomes
/// available) or to display a placeholder widget while the image is loading.
///
/// For more information on how to interpret the arguments that are passed to
/// this builder, see the documentation on [ImageFrameBuilder].
///
/// To have finer-grained control over the way that an image's loading
/// progress is communicated to the user, see [loadingBuilder].
///