Commit ae565547 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Add example to RichText (#5708)

parent 663596bc
......@@ -2063,6 +2063,21 @@ class Flow extends MultiChildRenderObjectWidget {
/// which is less verbose and integrates with [DefaultTextStyle] for default
/// styling.
///
/// Example:
///
/// ```dart
/// new RichText(
/// text: new TextSpan(
/// text: 'Hello ',
/// style: DefaultTextStyle.of(context).style,
/// children: <TextSpan>[
/// new TextSpan(text: 'bold', style: new TextStyle(fontWeight: FontWeight.bold)),
/// new TextSpan(text: ' world!'),
/// ],
/// ),
/// ),
/// ```
///
/// See also:
///
/// * [Text]
......
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