super_rich_text 0.1.0 copy "super_rich_text: ^0.1.0" to clipboard
super_rich_text: ^0.1.0 copied to clipboard

outdated

The easiest way to style custom text snippets.

Super Rich Text #

Check it out at Pub.Dev

The easiest way to style custom text snippets

ezgif com-video-to-gif-3

In standard markers the "*" is set to bold and "/" to italics as in the example:

SuperRichText(
  text: 'Text in *bold* and /italic/'
)

But you can change and set your own by passing a list of other labels:

SuperRichText(
  text: 'Text in *bold* and /italic/ with color llOrangell and color rrRedrr',
  style: TextStyle(
    color: Colors.black87,
    fontSize: 22
  ),
  othersMarkers: [
    MarkerText(
      marker: 'll',
      style: TextStyle(
        color: Colors.orangeAccent
      )
    ),
    MarkerText(
      marker: 'rr',
      style: TextStyle(
          color: Colors.redAccent
      )
    ),
  ],
)

Or even override "*" and "/" by setting global styles not to be used:

SuperRichText(
  text: 'Text in *bold* and /italic/ with color llOrangell and color rrRedrr',
  useGlobalMarkers: false, // set false
  style: TextStyle(
    color: Colors.black87,
    fontSize: 22
  ),
  othersMarkers: [
    MarkerText(
        marker: '*',
        style: TextStyle(
            color: Colors.orangeAccent
        )
    )...
  ],
)

The markers in the "othersMarkers" parameter are only for the widget in question, but you can also distinguish global markers:

SuperRichText.globalMarkerTexts.add(MarkerText(
    marker: '|',
    style: TextStyle(
      color: Colors.deepPurple
    )
  )
);
33
likes
0
pub points
86%
popularity

Publisher

verified publishercleancode.dev

The easiest way to style custom text snippets.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on super_rich_text