Skip to main content

fintel_fwfh_svg 0.17.0-beta.1 copy "fintel_fwfh_svg: ^0.17.0-beta.1" to clipboard
fintel_fwfh_svg: ^0.17.0-beta.1 copied to clipboard

WidgetFactory extension to render SVG with flutter_svg plugin.

SvgFactory #

Flutter Coverage Pub

WidgetFactory extension to render SVG with flutter_svg plugin. This is a companion add-on for flutter_widget_from_html_core package.

Getting Started #

Add this to your app's pubspec.yaml file:

dependencies:
  flutter_widget_from_html_core: any
  fwfh_svg: ^0.17.0-beta.1

Usage #

Then use HtmlWidget with a custom factory:

import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
import 'package:fwfh_svg/fwfh_svg.dart';

// ...

HtmlWidget(
  html,
  factoryBuilder: () => MyWidgetFactory(),
)

// ...

class MyWidgetFactory extends WidgetFactory with SvgFactory {
}

Configuration #

SvgFactory has a few getters to change its behavior. See the API reference for the up to date list. Override them in your factory like this:

class MyWidgetFactory extends WidgetFactory with SvgFactory {
  @override
  bool get svgAllowDrawingOutsideViewBox => true;
}
0
likes
150
points
41
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

WidgetFactory extension to render SVG with flutter_svg plugin.

Topics

#fwfh

License

MIT (license)

Dependencies

fintel_widget_from_html_core, flutter, flutter_svg

More

Packages that depend on fintel_fwfh_svg