refactor(整理richText的说明):

This commit is contained in:
sanfan.hx
2019-01-30 17:04:31 +08:00
parent 4405d157a3
commit 03c5c195eb
2 changed files with 6 additions and 26 deletions

View File

@ -11,33 +11,13 @@ const String intro = """
无论是Text或者Text.rich, 查看源代码发现. 都是由RichText构建出来
RichText的源码展示
```
// Text 源码
@override
Widget build(BuildContext context) {
...
Widget result = RichText(
...
style: effectiveTextStyle,
text: data,
children: textSpan != null ? <TextSpan>[textSpan] : null,
),
);
...
return result;
}
```
### **基本实例**
### **基本用法**
我们可以让一段文本通过使用不同的TextSpan显示不同的样式。比如我们让"Hello beautiful world"的每个单词都显示不同的样式.
""";
const String diff = """
""";
class Demo extends StatefulWidget {
static const String routeName = '/element/Form/Text/RichText';
_Demo createState() => _Demo();