A simple display for BBCode in Flutter. Supports custom tags and styles.
- Render BBCode into human readable text.
- Support for custom tags
- Install the package using the instruction on the installation page.
A fully working example can be found on Github.
After installing the package displaying BBCode is rather straighforward. When using this code note that you will be using ALL available BBCode parsers.
Widget parsedBBCode = BBCodeText(data: _yourString);
The default style currently used is
TextStyle(color: Colors.black, fontSize: 14). This can be overwritten using the
In order to make the package versatile as possible it's possible to define your own tags, or overwrite existing ones. To supply your own tag parsers use the optional
Creating your own tags
You can create your own tags by either extending the
AdvancedTag classes. The last one takes care of all BBCode it self. This can be useful in certain situations, but the
StyleTag should be sufficient for most style changes.
WrappedStyleTag can be used to wrap a style around the tag. An example of a tag that implements this is the [quote] tag.
Contribute to the project
Feel free to create issues and pull-requests on Github. I will take a look at them as soon as possible.