Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved AssetImage Docs #78173

Merged
merged 9 commits into from
May 17, 2021
4 changes: 4 additions & 0 deletions packages/flutter/lib/src/painting/image_resolution.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ const double _kLowDprLimit = 2.0;
/// ```dart
/// AssetImage('icons/heart.png')
/// ```
/// See also:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line before paragraph

///
/// * [loading images](https://flutter.dev/docs/development/ui/assets-and-images#loading-images-1)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start each bullet with a captital letter

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That link doesn't actually show how to use an AssetImage to get the asset, as far as i can tell. It shows how to use an AssetImage with an Image widget but that's already explained in the "See also" link at the bottom of this section.

What #78088 is asking for is for sample code showing how to actually get a ui.Image object out of an AssetImage.

/// for an example on how to use the [AssetImage] class to fetch an image.
///
/// ## Assets in packages
///
/// To fetch an asset from a package, the [package] argument must be provided.
Expand Down