pretty_qr_code 3.0.0 copy "pretty_qr_code: ^3.0.0" to clipboard
pretty_qr_code: ^3.0.0 copied to clipboard

Pretty QR code for Flutter. You can round the edges with parameter or use the standard view.

Pretty QR Code #

Pub Likes on pub.dev Star on Github License: MIT

A highly customizable Flutter widget that make it easy to rendering QR code.

Features #

  • Live Preview
  • Built on qr package.
  • Supports embedding images.
  • Support tween animation
  • Support some options for images

If you want to say thank you, star us on GitHub or like us on pub.dev

Usage #

First, follow the package installation instructions and add a PrettyQrView widget to your app:

PrettyQrView.data(
  data: 'lorem ipsum dolor sit amet',
  decoration: const PrettyQrDecoration(
    image: PrettyQrDecorationImage(
      image: AssetImage('images/flutter.png'),
    ),
  ),
)

If you want to pass non-string data or want to specify a QR version, consider using the default PrettyQrView constructor:

@protected
late QrImage qrImage;

@override
void initState() {
  super.initState();

  final qrCode = QrCode(
    8,
    QrErrorCorrectLevel.H,
  )..addData('lorem ipsum dolor sit amet');

  qrImage = QrImage(qrCode)
}

@override
Widget build(BuildContext context) {
  return PrettyQrView(
    qrImage: qrImage,
    decoration: const PrettyQrDecoration(),
  );
}

Note: Do not create QrImage inside build method, or you may otherwise have undesired jank in UI thread.

See the example folder for more code samples of the various possibilities.

Contributing #

Contributions are welcomed!

Here is a curated list of how you can help:

  • Fix typos/grammar mistakes
  • Report parts of the documentation that are unclear
  • Report bugs and scenarios that are difficult to implement

TODO: #

  • Quiet Zone
  • Gradient filling
  • Export as image
  • Error handling API
  • Gaps between modules
  • Background color for QR code
  • Timing Patterns and Alignment Patterns
  • Automatic image scale limitation (embedded mode)
287
likes
0
pub points
98%
popularity

Publisher

unverified uploader

Pretty QR code for Flutter. You can round the edges with parameter or use the standard view.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, meta, qr

More

Packages that depend on pretty_qr_code