0 purchases
simple formatted text
Simple text widget to show formated text, including link text
Simple formatted text was made to allow you to customize text style with special chars.
Quick Start #
Import this library into your project:
simple_formatted_text: ^latest_version
copied to clipboard
Or do:
$ flutter pub add simple_formatted_text
copied to clipboard
Basic Implementation #
SimpleFormattedText("Text with *bold* word")
copied to clipboard
More possibilities
Open URL
SimpleFormattedText(
"Open [Google](https://google.com/) to search things",
onLinkTap: (link) {
// .. do stuff, not need to be only web links
url_launch(link);
},
)
copied to clipboard
Text actions, with different text style
SimpleFormattedText(
"Do [action 1](action 1) or [action 2](action 2)",
linkTextStyle: TextStyle(color: Colors.green),
onLinkTap: (actionStr) {
switch(actionStr) {
case "action 1":
//...
break;
case "action 2":
//...
break;
},
},
)
copied to clipboard
Change color and size, with an initial textstyle
SimpleFormattedText(
"This is a _[big and red](addSize:4,color:#FFFF0000)_ string",
style: TextStyle(color: Colors.deepPurple, fontSize: 20),
)
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.