Unverified Commit 0174af8b authored by Haeseok Lee's avatar Haeseok Lee Committed by GitHub

Update LinearGradient docs (#63604)

parent 1de673bc
......@@ -330,22 +330,23 @@ abstract class Gradient {
/// Typically this class is used with [BoxDecoration], which does the painting.
/// To use a [LinearGradient] to paint on a canvas directly, see [createShader].
///
/// {@tool snippet}
///
/// {@tool dartpad --template=stateless_widget_material}
/// This sample draws a picture that looks like vertical window shades by having
/// a [Container] display a [BoxDecoration] with a [LinearGradient].
///
/// ```dart
/// Container(
/// Widget build(BuildContext context) {
/// return Container(
/// decoration: BoxDecoration(
/// gradient: LinearGradient(
/// begin: Alignment.topLeft,
/// end: Alignment(0.8, 0.0), // 10% of the width, so there are ten blinds.
/// colors: [const Color(0xFFFFFFEE), const Color(0xFF999999)], // whitish to gray
/// colors: [const Color(0xffee0000), const Color(0xffeeee00)], // red to yellow
/// tileMode: TileMode.repeated, // repeats the gradient over the canvas
/// ),
/// ),
/// )
/// );
/// }
/// ```
/// {@end-tool}
///
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment