simple_rich_text 1.0.22 copy "simple_rich_text: ^1.0.22" to clipboard
simple_rich_text: ^1.0.22 copied to clipboard

outdated

Display a Dart string in Flutter using simple rich text characters.

simple_rich_text #

Easily format Flutter text with simple format characters:

r'_/this is all three_/ (bold, underlined, and /italicized/). {home}Click to navigate to home screen'

Screenshot

Format Characters #

character format effect
asterisk (*) bold
slash (/) italicize
underscore (_) underline

Features #

  • support text hyperlinks to other screens by preceding formatted text with route inside curly brackets: e.g., "... {calendar}go to calendar screen".

Sample Inputs: #

'this is /italic/'

'this is *bold*'

'*_/this is all three*_/ (*bold*, _underlined_, and /italicized/)'

'you can quote characters to NOT format a word \*bold\*'

'this is _underline_'

'go to _{/myroute}home_ page'

'this is ~important~(red).'

'this is _*bold and underlined*_.'

Requirements #

Ancestor MUST have textDirection set (required by internal RichText widget), either through MaterialApp widget or explicitly wrapped by a Directionality widget:

Directionality(
    child: SimpleRichText(text: 'Peter', term: 't'),
    textDirection: TextDirection.ltr)

Pull Requests #

Pull requests are welcome!

Usage #

Add a new dependency line to your project/pubspec.yaml file:

dependencies:
  ...
  simple_rich_text: ^1.0.22      # use latest version

Don't forget to flutter pub get.

Examples #

See the example directory.

85
likes
0
pub points
92%
popularity

Publisher

verified publisheronlyup.com

Display a Dart string in Flutter using simple rich text characters.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, meta

More

Packages that depend on simple_rich_text