qr_svg_generator 0.0.1 copy "qr_svg_generator: ^0.0.1" to clipboard
qr_svg_generator: ^0.0.1 copied to clipboard

This package creates a SVG vector graphic code based on a QR code

A library for converting QR codes to SVG vector graphic code

Features #

  • Generate a SVG vector graphic code from a QR code (provided by the qr package).
  • Optionally set colorA and colorB for a gradient color.

Getting started #

To start, import the dependency in your code:

import 'package:qr_svg_generator/qr_svg_generator.dart';

To generate a SVG vector graphic code call generateQrSvgImage:

final qrSvgImageCode = generateQrSvgImage(
  qrCode: myQrCode,
  imageSizeInPx: 500,
  title: "MySvg",
  colorA: Colors.blue,
  colorB: Colors.pink);

Now you can use the toString() method of your qrSvgImage instance to retrieve your SVG code for further use (e.g. safe to a .svg file):

saveTextFile(qrSvgImageCode.toString(), "mySvgFile.svg");
5
likes
130
pub points
44%
popularity

Publisher

unverified uploader

This package creates a SVG vector graphic code based on a QR code

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, qr

More

Packages that depend on qr_svg_generator