fwfh_svg
0.16.1, released a year ago by daohoangson.com
WidgetFactory extension to render SVG inside HTML widgets via flutter_svg.
WASM-readyQuiet but busy
What it does
Extends flutter_widget_from_html_core to render SVG images using the flutter_svg plugin. It enables custom factory configuration such as allowing drawing outside the view box.
AI-written summary of version 0.16.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are using flutter_widget_from_html_core and need to render SVG elements inside your HTML content.
- You want to configure SVG rendering behavior within HTML widgets using a custom WidgetFactory.
Skip it when
- you are not using flutter_widget_from_html_core.
Strengths
- Seamless integration with flutter_widget_from_html_core.
- Supports customizable properties like svgAllowDrawingOutsideViewBox.
Weaknesses
- Strictly dependent on specific versions of flutter_widget_from_html_core and flutter_svg.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add flutter_widget_from_html_core and fwfh_svg to dependencies, then use SvgFactory in your custom WidgetFactory.
class MyWidgetFactory extends WidgetFactory with SvgFactory {
@override
bool get svgAllowDrawingOutsideViewBox => true;
}Alternatives
Packages that do the same job and could replace fwfh_svg.
- cached_network_svg_image
Load and cache SVG images from the network in Flutter
57Compare
Works with
Packages commonly used together with fwfh_svg: ones it builds on, ones built on it, and its own family.
- flutter_svgfwfh_svg depends on itRenders Scalable Vector Graphics (SVG 1.1) and precompiled vector graphics in Flutter.
- flutter_widget_from_html_corefwfh_svg depends on itRender HTML content as native Flutter widgets with correctness and extensibility.
- fwfh_webviewSame familyWidgetFactory extension to render IFRAME elements using the official WebView plugin.
- fwfh_url_launcherSame familyWidgetFactory mixin to launch links in HTML widgets via url_launcher.
- fwfh_cached_network_imageSame familyWidgetFactory extension to render HTML IMG tags using cached_network_image.
- fwfh_chewieSame familyRender VIDEO tags using Chewie inside HtmlWidget
- flutter_widget_from_htmlBuilt on fwfh_svgRender HTML content as native Flutter widgets with support for common tags, CSS, and media.