Fix samples of ExactAssetImage (#79721)
This commit is contained in:
parent
f789acae41
commit
7cc3f84294
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user