Add example to RichText (#5708)

This commit is contained in:
Ian Hickson 2016-09-01 11:59:23 -07:00 committed by GitHub
parent 663596bc54
commit ae56554705

View File

@ -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]