Fix samples of ExactAssetImage (#79721)

This commit is contained in:
Mateus Felipe C. C. Pinto 2021-04-16 15:04:03 -03:00 committed by GitHub
parent f789acae41
commit 7cc3f84294
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1006,9 +1006,11 @@ class MemoryImage extends ImageProvider<MemoryImage> {
///
/// Then, to fetch the image and associate it with scale `1.5`, use:
///
/// {@tool snippet}
/// ```dart
/// AssetImage('icons/heart.png', scale: 1.5)
/// const ExactAssetImage('icons/heart.png', scale: 1.5)
/// ```
/// {@end-tool}
///
/// ## Assets in packages
///
@ -1016,9 +1018,11 @@ class MemoryImage extends ImageProvider<MemoryImage> {
/// For instance, suppose the structure above is inside a package called
/// `my_icons`. Then to fetch the image, use:
///
/// {@tool snippet}
/// ```dart
/// AssetImage('icons/heart.png', scale: 1.5, package: 'my_icons')
/// const ExactAssetImage('icons/heart.png', scale: 1.5, package: 'my_icons')
/// ```
/// {@end-tool}
///
/// Assets used by the package itself should also be fetched using the [package]
/// argument as above.