【发布时间】:2017-04-30 08:34:00
【问题描述】:
例如,我可能在当前小部件树中有一个 RichText,看起来像
RichText(
text: TextSpan(
text: 'Hello ',
style: DefaultTextStyle.of(context).style,
children: <TextSpan>[
TextSpan(text: 'bold', style: TextStyle(fontWeight: FontWeight.bold)),
TextSpan(text: ' world!'),
],
),
)
我尝试使用find.text('Hello bold world!'),但它不起作用,因为它不是文本。
【问题讨论】:
标签: flutter dart flutter-test