Widget build(BuildContext context) { return ExpandableText( message, expandText: 'show more', maxLines: 2, linkColor: Colors.blue, animation: true, collapseOnTextTap: true, prefixText: username, onPrefixTap: () => showProfile(username), prefixStyle: TextStyle(fontWeight: FontWeight.bold), onHashtagTap: (name) => showHashtag(name), hashtagStyle: TextStyle( color: Color(0xFF30B6F9), ), onMentionTap: (username) => showProfile(username), mentionStyle: TextStyle( fontWeight: FontWeight.w600, ), onUrlTap: (url) => launchUrl(url), urlStyle: TextStyle( decoration: TextDecoration.underline, ), ); } |