有没有办法设置tooltip
on a Text
widget:
new Text(
"Some content",
tooltip: "Displays a message to you"
)
这是行不通的。然而它确实有效,因为这里提到 https://docs.flutter.io/flutter/material/Tooltip-class.html,关于诸如FloatingActionButton
:
new FloatingActionButton(
onPressed: action,
tooltip: "Action",
child: new Icon(Icons.add),
)
据我了解,Text
类根本没有tooltip
实施的。我想知道是否有办法做到这一点。
您可以将文本包装成Tooltip https://docs.flutter.io/flutter/material/Tooltip-class.html widget.
Tooltip(message: "Hello World", child: new Text("foo"));
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)