jujuba_svg 1.0.2 copy "jujuba_svg: ^1.0.2" to clipboard
jujuba_svg: ^1.0.2 copied to clipboard

JujubaSVG is a Flutter library designed to make SVG manipulation and interaction easy and reactive. It bridges Flutter ↔️ JavaScript ↔️ SVG, allowing developers to dynamically update, animate, and res [...]

Welcome to the JujubaSVG library 👋 #

Welcome to the JujubaSVG library!

jujubaSVG is a user-friendly library for handling SVG files in Flutter applications. It enables granular manipulation of SVG elements - you can access any element by its ID to modify properties like background color, stroke, and other attributes.

📚 Check our documentation here.

How to use? #

Let's say you want to use the library in your my_beatiful_screen.dart. You need to initialize the controller:

class MyBeautifulScreen extends StatelessWidget {
  final JujubaCommander commander = JujubaCommander();

  //...

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: JujubaSVGWidget(
            commander: commander,
            svgText: svgText,
            onElementClick: (nodeInfo) => {},
        ),
    )
//...

The library provides a widget called JujubaSVGWidget, there you can the commander, svgText, and onElementClick.

  • commander: allow you to send commands to manipulate the SVG;

  • svgText: your SVG;

  • onElementClick: callback to intercept click events in your SVG.

Sample project #

More details you can check in our sample project.

How to contribute? #

  • Fork this repository;

  • Solve an issue, or do any improvement you want;

  • Open a PR to the origin repository.

As soon the PR is reviewed and merged, your update will be available.

3
likes
0
points
15
downloads

Publisher

verified publishercodandotv.com

Weekly Downloads

JujubaSVG is a Flutter library designed to make SVG manipulation and interaction easy and reactive. It bridges Flutter ↔️ JavaScript ↔️ SVG, allowing developers to dynamically update, animate, and respond to events within an SVG rendered in a WebView.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, webview_flutter

More

Packages that depend on jujuba_svg