/// ![An example using TextStyle to change the text opacity and color](https://flutter.github.io/assets-for-api-docs/assets/painting/text_style_opacity_and_color.png)
/// Each line in this example is progressively more opaque. The base color is
/// [material.Colors.black], and [Color.withOpacity] is used to create a
/// derivative color with the desired opacity.
///
///
/// ```dart
/// ```dart
/// Text.rich(
/// RichText(
/// TextSpan(
/// text: TextSpan(
/// style: DefaultTextStyle.of(context).style,
/// children: <TextSpan>[
/// children: <TextSpan>[
/// TextSpan(
/// TextSpan(
/// text: 'You don\'t have the votes.\n',
/// text: 'You don\'t have the votes.\n',
...
@@ -90,10 +96,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
...
@@ -90,10 +96,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
/// In this example, the ambient [DefaultTextStyle] is explicitly manipulated to
/// In this example, the ambient [DefaultTextStyle] is explicitly manipulated to
...
@@ -109,7 +112,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
...
@@ -109,7 +112,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
/// ```
/// ```
/// {@end-tool}
/// {@end-tool}
///
///
/// ## Line height
/// ### Line height
///
///
/// By default, text will layout with line height as defined by the font.
/// By default, text will layout with line height as defined by the font.
/// Font-metrics defined line height may be taller or shorter than the font size.
/// Font-metrics defined line height may be taller or shorter than the font size.
...
@@ -137,21 +140,24 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
...
@@ -137,21 +140,24 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
///
///
/// Examples of the resulting heights from different values of `TextStyle.height`:
/// Examples of the resulting heights from different values of `TextStyle.height`:
///
///
/// ![For Roboto, with a fontSize of 50 pixels, if the height is set to null, the line ends up 59 pixels high. Setting the height to 1.0, on the other hand, changes the line's actual height to 50 pixels. Setting the height to 2.0 changes the line's actual height to 100 pixels.](https://flutter.github.io/assets-for-api-docs/assets/painting/text_height_comparison_diagram.png)
/// See [StrutStyle] for further control of line height at the paragraph level.
/// See [StrutStyle] for further control of line height at the paragraph level.
///
///
/// ## Wavy red underline with black text
/// ### Wavy red underline with black text
///
///
/// {@tool sample}
/// {@tool sample}
/// Styles can be combined. In this example, the misspelt word is drawn in black
/// Styles can be combined. In this example, the misspelt word is drawn in black
/// text and underlined with a wavy red line to indicate a spelling error.
/// text and underlined with a wavy red line to indicate a spelling error. (The
/// remainder is styled according to the Flutter default text styles, not the
/// ambient [DefaultTextStyle], since no explicit style is given and [RichText]
/// does not automatically use the ambient [DefaultTextStyle].)
///
///
/// ![An example using TextStyle to highlight a word with a red wavy underline](https://flutter.github.io/assets-for-api-docs/assets/painting/text_style_wavy_red_underline.png)
/// ![An example using TextStyle to highlight a word with a red wavy underline](https://flutter.github.io/assets-for-api-docs/assets/painting/text_style_wavy_red_underline.png)
///
///
/// ```dart
/// ```dart
/// Text.rich(
/// RichText(
/// TextSpan(
/// text: TextSpan(
/// text: 'Don\'t tax the South ',
/// text: 'Don\'t tax the South ',
/// children: <TextSpan>[
/// children: <TextSpan>[
/// TextSpan(
/// TextSpan(
...
@@ -172,7 +178,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
...
@@ -172,7 +178,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
/// ```
/// ```
/// {@end-tool}
/// {@end-tool}
///
///
/// ## Borders and stroke (Foreground)
/// ### Borders and stroke (Foreground)
///
///
/// {@tool sample}
/// {@tool sample}
/// To create bordered text, a [Paint] with [Paint.style] set to [PaintingStyle.stroke]
/// To create bordered text, a [Paint] with [Paint.style] set to [PaintingStyle.stroke]
...
@@ -208,7 +214,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
...
@@ -208,7 +214,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
/// ```
/// ```
/// {@end-tool}
/// {@end-tool}
///
///
/// ## Gradients (Foreground)
/// ### Gradients (Foreground)
///
///
/// {@tool sample}
/// {@tool sample}
/// The [foreground] property also allows effects such as gradients to be
/// The [foreground] property also allows effects such as gradients to be
...
@@ -236,31 +242,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
...
@@ -236,31 +242,7 @@ const String _kColorBackgroundWarning = 'Cannot provide both a backgroundColor a
/// ```
/// ```
/// {@end-tool}
/// {@end-tool}
///
///
/// ## Font features
/// ### Custom Fonts
///
/// Some fonts can be configured in quite fine detail. To provide access to
/// these configuration options, [FontFeature] tags can be specified using the
/// [fontFeatures] property.
///
/// {@tool sample}
/// In this example, the fictional font "JeffersonCombined" is known to contain
/// both roman and italics characters, and the italics characters are selected
/// using the `ital` font feature.
///
/// ```dart
/// Text.rich(
/// TextSpan(
/// text: 'In Virginia, we plant seeds in the ground',