Put opacity image source inside "Sample code" (#22385)
See https://github.com/flutter/flutter/pull/22278#pullrequestreview-159230244
This commit is contained in:
parent
a0944bb228
commit
598ef49051
@ -152,12 +152,16 @@ class Directionality extends InheritedWidget {
|
|||||||
/// ## Transparent image
|
/// ## Transparent image
|
||||||
///
|
///
|
||||||
/// If only a single [Image] needs to be composited with an opacity between 0.0
|
/// If only a single [Image] needs to be composited with an opacity between 0.0
|
||||||
/// and 1.0, it's much faster to directly use [Image] as following:
|
/// and 1.0, it's much faster to directly use [Image].
|
||||||
|
///
|
||||||
|
/// ### Sample code
|
||||||
|
///
|
||||||
|
/// This example draws an [Image] with 0.5 opacity:
|
||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Image(
|
/// Image.network(
|
||||||
/// image: image,
|
/// 'https://github.com/flutter/flutter_gallery_assets/raw/master/lib/products/backpack.png',
|
||||||
/// color: Color.fromRGBO(255, 255, 255, opacity),
|
/// color: Color.fromRGBO(255, 255, 255, 0.5),
|
||||||
/// colorBlendMode: BlendMode.modulate
|
/// colorBlendMode: BlendMode.modulate
|
||||||
/// )
|
/// )
|
||||||
/// ```
|
/// ```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user