If false, the QR code will be rendered and the embedded image will be ignored. If true, any failure to load the embedded image will trigger the errorStateBuilder or render an empty Container. If false, the error state Widget will grow/shrink to whatever size it needs.Īn ImageProvider that defines an image to be overlaid in the center of the QR code. If true, the error Widget will be constrained to the square that the QR code was going to be drawn in. If not given, will auto size using shortest size constraint.Ĭonfigures the QR code eyes' (corners') shape and color.Ĭonfigures the shape and the color of the dots.Īdds an extra pixel in size to prevent gaps (default is true).Īllows you to show an error state Widget in the event there is an error rendering the QR code (e.g.: version is too low, input is too long, etc). See for limitations and details.Ī value defined on QrErrorCorrectLevel. The following options are available: Property Next, to render a basic QR code you can use the following code (or something like it): QrImageView(ĭepending on your data requirements you may want to tweak the QR code output. To start, import the dependency in your code: import 'package:qr_flutter/qr_flutter.dart' Keep in mind the master branch could be unstable.Īfter adding the dependency to your pubspec.yaml you can run: flutter packages get or update your packages using To do so, use the following configuration in your pubspec.yaml: dependencies: Note: If you're using the Flutter master channel, if you encounter build issues, or want to try the latest and greatest then you should use the master branch and not a specific release version. You should add the following to your pubspec.yaml file: dependencies: If you're using an incompatible version of flutter, please use a 3.x version of this library. Version compatibility: 4.0.0+ supports null safety and requires a version of Flutter that is compatible.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |