v0.2.1link_text
适用于 Flutter 应用的易于使用的文本小部件,可将内联 URL 转换为可点击链接。支持自定义样式。
49喜欢 3250近 30 天下载140Pub 分数
AndroidiOSWebmacOSWindowsLinux
适用于 Flutter 应用的易于使用的文本小部件,可将内联 URL 转换为可工作的可点击链接
以下为英文项目原文快照,最新内容请访问 GitHub。
Easy to use text widget for Flutter apps, which converts inlined URLs into clickable links. Allows custom styling.
LinkText widget does not require any setup. Simply pass a String with inlined URLs, and the widget will take care of the rest.
final String _text = 'Lorem ipsum https://flutter.dev\nhttps://pub.dev';
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: LinkText(
_text,
textAlign: TextAlign.center,
// You can optionally handle link tap event by yourself
// onLinkTap: (url) => ...
),
),
);
}
Add to pubspec.yaml:
dependencies:
link_text: ^0.2.1
For more info, check out example project.
依赖清单 3 项
{"sdk":"flutter"}^6.2.4{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗