rich_text_widget 0.2.7 copy "rich_text_widget: ^0.2.7" to clipboard
rich_text_widget: ^0.2.7 copied to clipboard

The library is very convenient to apply to internationalized text without splitting strings.

README of Chinese #

Rich text is required by many apps, and Flutter also provides rich text functions, but for multilingual apps, RichText is not easy to use, or can’t be used.

rich_text_widget is simple and convenient to use, no need to split the string

Example:

RichTextWidget(
      // default Text
      Text(
        'You have pushed the button this many times:',
        style: TextStyle(color: Colors.black),
      ),
      // rich text list
      richTexts: [
        BaseRichText(
          "pushed",
          style: TextStyle(color: Colors.yellow),
          onTap: () => {print("touch pushed")},
        ),
        BaseRichText(
          "button",
          style: TextStyle(color: Colors.red),
          onTap: () => {print("touch button")},
        ),
      ],
    )

Demo: #

Simulator Screen Shot - iPhone 11 Pro - 2020-08-10 at 10.52.06.png

Props : #

RichTextWidget:

Name type
defaultText Text
richTexts List <BaseRichText>
caseSensitive bool (defalut = true)

BaseRichText:

Name type
data String
style TextStyle
onTap Function
4
likes
120
pub points
83%
popularity

Publisher

unverified uploader

The library is very convenient to apply to internationalized text without splitting strings.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (LICENSE)

Dependencies

flutter

More

Packages that depend on rich_text_widget