Barcode generator base on ZXing support multiple fortmats with PlatformView
Getting Started #
Check out the example directory for a sample app using Barcode generator.
BarcodeGenerator( witdth: 300, height: 200, backgroundColor: Colors.red, fromString: "xxxxxxxx", codeType: BarCodeType.kBarcodeFormatCode128, )
iOS Integration #
Opt-in to the embedded views preview by adding a boolean property to the app's
Info.plist file with the key
io.flutter.embedded_views_preview and the value
If you are getting error like this:
To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set
use_modular_headers! globally in your Podfile, or specify
:modular_headers => true for particular dependencies.
Make sure you followed those steps:
Create a Bridging Header. If you've created the project using
flutter create -i swift [projectName] you are all set. If not, you can enable Swift support by opening the project with XCode, then choose
File -> New -> File -> Swift File. XCode will ask you if you wish to create Bridging Header, click yes.
Make sure you have
!use_frameworks in the
Runner block, in
Go to your ios folder, delete
Podfile.lock and Pods folder and then execute
pod install --repo-update
- [x] Generate barcode with multiple formats
- [x] Supports adjusting the image's dimensions
- [x] No internet connection required
- [ ] Scanning barcode
Supported Formats #
|1D product||1D industrial||2D|
|UPC-A||Code 39||QR Code|
|UPC-E||Code 93||Data Matrix|
|EAN-8||Code 128||Aztec (beta)|
|EAN-13||Codabar||PDF 417 (beta)|
- Update LICENSE and cleaning up code
- Implements platform-specific barcode generate function base on ZXing
Demonstrates how to use the barcode_generator plugin.
Getting Started #
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
dependencies: barcode_generator: ^0.2.7
2. Install it
You can install packages from the command line:
$ flutter pub get
Alternatively, your editor might support
flutter pub get.
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Oct 24, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
- Dart: 2.5.1
- pana: 0.12.21
- Flutter: 1.9.1+hotfix.4
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.