Flutter Widget from HTML
This package extends the flutter_widget_from_html_core package with extra functionalities by using external depedencies like cached_network_image or url_launcher. It should be good enough as a quick starting point but you can always use the core directly if you dislike the dependencies.
Usage
To use this plugin, add flutter_widget_from_html
as a dependency in your pubspec.yaml file.
See the Example app for inspiration.
Example
Note: HtmlWidget.config
is optional, see dartdoc for all available configuration keys and their default values.
Features
This package has all the features of flutter_widget_from_html_core
and some nice extras:
- Renders A tag with theme accent color, launch url via
url_launcher
- Renders IMG tag with
CachedNetworkImage
and padding (Config.imagePadding
) - Renders lists (OL/UL) with marker and padding (
Config.listBullet
,Config.listPaddingLeft
) - Renders texts with padding (
Config.textPadding
) - Supports relative url (A href, IMG src)