
The difference between the two is the same as noted above. The package also has two constructors for selectable text support - SelectableHtml() and omDom(). This eliminates the need to parse the modified Document back to a string, pass to Html(), and convert back to a Document, thus cutting down on load times. Then, you can directly pass the modified Document to the package. If you would like to modify or sanitize the HTML before rendering it, then omDom() is for you - you can convert the HTML string to a Document and use its methods to modify the HTML as you wish. The Html() constructor is for those who would like to directly pass HTML from the source to the package to be rendered. The package currently has two different constructors - Html() and omDom().
Code to bottom justify text css code#
If you need something more robust and customizable, the package also provides a number of optional custom APIs for extremely granular control over widget rendering! API Reference: #īelow, you will find brief descriptions of the parameters the Html widget accepts and some code snippets to help you use this package. This project has expanded to include support for basic styling as well! Originally created to allow basic rendering of HTML content into the Flutter widget tree, This package is designed with simplicity in mind. Typedef ImageSourceMatcher (with examples)Īdd the following to your pubspec.yaml file: dependencies:Ĭurrently Supported Inline CSS Attributes: #ĭon't see a tag or attribute you need? File a feature request or contribute to the project! Why this package? #


Screenshot 1Ĭurrently Supported Inline CSS Attributes A Flutter widget for rendering HTML and CSS as Flutter widgets.
