re_svg_new 0.0.7 copy "re_svg_new: ^0.0.7" to clipboard
re_svg_new: ^0.0.7 copied to clipboard

A tiny and super-fast SVG rendering library for Flutter, with CSS support.

re_svg_new #

A fork of re_svg.

A tiny and super-fast SVG rendering library for Flutter, with CSS support.

Underneath, the parsing and rendering of SVG run in isolates to prevent any potential frame drops.

Getting Started #

re_svg_new is designed for ease of use. By simply introducing the SvgView widget, SVGs can be rendered correctly.

import 'package:re_svg_new/re_svg_new.dart';

final data = """
<svg height="100" width="100">
  <circle r="45" cx="50" cy="50" fill="blue" />
</svg> 
""";

SvgView(
  data: data,
  intrinsic: true,
);

Screenshot #

Screenshot

Supported Platforms #

  • ✅ iOS
  • ✅ Android
  • ✅ macOS
  • ❌ Windows
  • ✅ Linux
  • ✅ Web

Linux is supported via the bundled native libresvg.so library.

On Web there is no native resvg binary, so SvgView falls back to the browser's own SVG engine: the SVG is rasterized through an <img>/<canvas> pipeline and returned to Flutter as a ui.Image. The public API is identical, but rendering of fonts and advanced CSS may differ slightly from the native resvg output.

  • resvg_action - Use GitHub Actions to compile the Rust library resvg for different platforms.
  • resvg_pod - For the iOS platform, Flutter’s local pod cannot directly download the online static library. Therefore, a new pod is created to download the resvg static library.
  • resvg_module - An Android library for dynamically linking the Rust library resvg.

For Rustaceans #

This project demonstrates how to integrate Flutter with Rust libraries.

0
likes
150
points
74
downloads

Documentation

API reference

Publisher

verified publishercsa8820.top

Weekly Downloads

A tiny and super-fast SVG rendering library for Flutter, with CSS support.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

ffi, flutter, flutter_web_plugins, plugin_platform_interface, web

More

Packages that depend on re_svg_new

Packages that implement re_svg_new