Cross-platform development is attractive because it lets you use a single codebase across multiple platforms, reducing effort while keeping the user experience consistent.
In a previous post, we covered the most popular barcode scanning libraries for the web. This time, we look at Flutter.
Why choose Flutter as your development framework?
Flutter is the most-used cross-platform framework. Fully 46% of mobile cross-platform developers built apps with it in 2023. Its popularity comes down to Flutter’s combination of efficiency, performance, and visual consistency.
- One codebase for all platforms
Flutter lets developers build for iOS, Android, Web, Windows, macOS, and Linux from a single codebase. This significantly shortens development time, simplifies maintenance, and keeps testing manageable.
- Native-like performance
Flutter apps are fast. Dart compiles ahead of time into native ARM code, and Flutter’s Skia rendering engine draws every pixel instead of relying on platform UI components. The result is smooth animations, high frame rates, and a responsive feel that closely matches native apps.
- Consistent visual experience
With a rich set of customizable Material and Cupertino widgets, Flutter ensures a seamless look and feel across platforms. Its widget-based architecture makes it easy to create highly polished, complex interfaces without sacrificing performance.
Flutter’s popularity is also buoyed by another trend: Free and open-source solutions are gaining popularity among developers. They offer a cost-effective way to implement barcode scanning and experiment with different features without major upfront investment.
Overview: The top 3 Flutter barcode scanner libraries
With performance and the developer experience in mind, let’s take a closer look at the three most widely used barcode scanning libraries for Flutter:
flutter_zxing
flutter_zxing is a plugin implemented using the Dart FFI (Foreign Function Interface) and the ZXing C++ port of the original ZXing library.
ZXing is one of the most popular libraries for barcode scanning and generation, though it is no longer in active development. While it was originally written in Java, there are many community ports and wrappers for other platforms.
Key features and benefits
flutter_zxing supports both file- and camera-based barcode scanning, including multi-barcode detection. Camera scanning is only available on Android and iOS. The barcode generation feature is limited to QR Code only.
The plugin doesn’t provide a full scanner UI. It does include a ReaderWidget that handles the camera view, scan frame, and basic controls like torch and zoom. Additionally, it allows you to limit the scanning area. Developers can extend the ReaderWidget with custom UI as needed.
Supported platforms
| Platform | Supported? |
| Android | ✅ Yes, minimum API level 21 |
| iOS | ✅ Yes, minimum iOS 11.0 |
| Web | ❌ No |
| macOS | ⚠️ No camera support |
| Windows | ⚠️ No camera support |
| Linux | ⚠️ No camera support |
Supported barcodes
flutter_zxing supports a broad range of barcodes, including both 1D and 2D symbologies. It covers the common types, like Code 128, EAN, UPC, Data Matrix, and QR Code, but also several niche types like rMQR Code, GS1 DataBar, and GS1 DataBar Expanded. You’ll find the full list in the table below.
Limitations
Performance issues
ZXing is prone to performance issues when scanning damaged, blurry, or low-contrast barcodes. Although it supports omnidirectional scanning, it may still struggle to read PDF417 codes when they are tilted or captured at an angle.
Compatibility issues
Because the underlying ZXing library is no longer actively maintained, compatibility problems may arise as new OS versions and devices are released. Developers have flagged barcode scanning failures on several models, including the Samsung Galaxy A02s and Note 10+, Infinix X6525, Xiaomi Redmi devices, Motorola Moto E, and the Nothing Phone 3a.
Lack of active development
The root cause of these compatibility problems is that ZXing is officially in maintenance mode. Because there’s no roadmap or active feature development, contributors or users must often handle updates and bug fixes on their own.
Summary: flutter_zxing
| Supported platforms | Android, iOS macOS, Windows, Linux (Beta) |
| Supported barcodes | Code 39, Code 93, Code 128, Codabar, GS1 DataBar, GS1 DataBar Expanded, EAN-8, EAN-13, ITF, UPC-A, UPC-E, Aztec, Data Matrix, MaxiCode, PDF417, QR Code, Micro QR Code, rMQR Code |
| Based on another library? | Yes, it’s a plugin built on ZXing C++ |
| Maintenance status | Dormant, as ZXing is in maintenance mode |
| Languages | Dart, C++ |
| Offers UI? | Yes, it includes a ReaderWidget |
| Input source? | Both live stream and static images |
| Developer resources | GitHub repository pub.dev package Integration tutorial |
google_mlkit_barcode_scanning
google_mlkit_barcode_scanning is a Flutter plugin that uses Google’s ML Kit Barcode Scanning API to read data from common barcode formats. It supports both Android and iOS. For readability reasons, we’ll refer to it as ML Kit from here on.
Key features and benefits
ML Kit can scan multiple barcodes at once, from any direction. It supports scanning from the live camera feed, as well as from image files. All barcode data is processed locally on the device. However, ML Kit may send metadata to Google servers.
The ML Kit plugin notably doesn’t include camera controls – it only handles the barcode detection logic. Developers must build the UI themselves.
Supported platforms
| Platform | Supported? |
| Android | ✅ Yes |
| iOS | ✅ Yes |
| Web | ❌ No |
| macOS | ❌ No |
| Windows | ❌ No |
| Linux | ❌ No |
Supported barcodes
ML Kit supports a variety of common 1D and 2D barcode formats, though it covers fewer symbologies than ZXing. Notably, it does not support GS1 DataBar or GS1 DataBar Expanded, which are increasingly used in the retail industry.
ML Kit also does not support less common barcode variants found in niche or internal environments, such as single-character 1D barcodes, ITF codes with fewer than 6 digits, FNC2–FNC4 control characters, or QR codes in ECI mode.
Unlike ZXing, which is open source, ML Kit is proprietary. This means developers cannot modify the detection model or add support for additional barcode formats. Additionally, ML Kit can only detect up to ten barcodes per API call.
Limitations
As google_mlkit_barcode_scanning is based on the native ML Kit API, the plugin inherits certain limitations from it.
Image resolution requirements
Google’s documentation provides input image guidelines. For reliable scans, it recommends using a high-resolution image, ideally 1280×720 or 1920×1080. For reference, a PDF417 code can contain up to 34 words in a single row, each 17 modules wide, so that row should ideally be at least 1156 pixels wide (i.e., 2 pixels per module).
Crashes and overheating on older iOS devices
On older iOS devices like the iPhone 7, running resource-intensive processes like text recognition and barcode scanning at the same time can cause high memory use, leading to app crashes. Newer devices tolerate it better, but may still overheat.
No support for ISBN add-on codes
When scanning codes on books, the scanner correctly detects the main ISBN barcode (i.e. EAN-13 or UPC-A). However, it fails to detect ISBN extensions: the 2- or 5-digit codes that encode information like price or series.
Summary: google_mlkit_barcode_scanning
| Supported platforms | Android, iOS |
| Supported barcodes | Code 39, Code 93, Code 128, Codabar, EAN-8, EAN-13, ITF, UPC-A, UPC-E, Aztec, Data Matrix, PDF417, QR Code |
| Based on another library? | Yes, the plugin is based on the native ML Kit Barcode Scanning API |
| Maintenance status | Actively maintained |
| Languages | Dart, Java, Objective-C |
| Offers UI? | No, detection only |
| Input source? | Both live stream and static images |
| Developer resources | GitHub repository pub.dev package Integration tutorial |
mobile_scanner
mobile_scanner is a Flutter plugin that combines camera access and barcode detection into a single package. It uses CameraX with ML Kit on Android, AVFoundation with VisionKit on iOS and macOS, and ZXing in the browser. In terms of UI, it provides a camera widget and some controls.
Key features and benefits
mobile_scanner supports scanning both from the live camera stream and from images, and it can detect multiple barcodes at once. It also offers camera switching and lets you define a specific region of interest for scanning. Torch control is available on Android and iOS/macOS, but not on the web. Autofocus depends on the device hardware, and auto-zoom is supported on Android, but not on iOS/macOS or Web.
Supported platforms
| Platform | Supported? |
| Android | ✅ Yes |
| iOS | ✅ Yes |
| Web | ✅ Yes |
| macOS | ✅ Yes |
| Windows | ❌ No |
| Linux | ❌ No |
Supported barcodes
mobile_scanner supports the common 1D and 2D symbologies. However, because it relies on different underlying libraries per platform, the covered formats can vary. For example: On iOS, GS1 DataBar, Expanded, and Limited are supported. Of these formats, none are supported on Android, and only GS1 DataBar is available on Web.
Limitations
Camera orientation issues
Multiple developers flag that the camera preview rotates even when the device orientation is locked. On Android, it rotates with the device regardless of system rotation settings, misaligning the camera with the UI. On iOS, locking system rotation can prevent the issue, but it may still occur in some cases.
Barcode detection issues on Web
mobile_scanner may fail to detect barcodes in browsers. On desktops, detection often doesn’t work, likely because most laptop cameras lack autofocus. Conversely, some users report that scanning works perfectly on PC browsers but fails completely on mobile browsers, even when the device camera focuses correctly.
PDF417 scanning issues on Android
On Android devices, mobile_scanner may fail to detect PDF417 codes with an error correction level lower than 5. On iOS devices, however, the issue does not occur. This behavior is most likely due to limitations in the underlying Android library.
Summary: mobile_scanner
| Supported platforms | Android, iOS, Web macOS |
| Supported barcodes | Android: Code 39, Code 93, Code 128, Codabar, EAN-8, EAN-13, ITF, UPC-A, UPC-E, Aztec, Data Matrix, PDF417, QR Code iOS/macOS: Code 39, Code 93, Code 128, Codabar, EAN-8, EAN-13, ITF, MSI Plessey, GS1 DataBar, GS1 DataBar Expanded, GS1 DataBar Limited, UPC-A, UPC-E, Aztec, Data Matrix, PDF417, Micro PDF417, QR Code, Micro QR Code Web: Code 39, Code 93, Code 128, Codabar, EAN-8, EAN-13, ITF, GS1 DataBar, UPC-A, UPC-E, Aztec, Data Matrix, PDF417, QR Code |
| Based on another library? | Yes, it’s based on ML Kit, Vision Kit, and ZXing-js |
| Maintenance status | Under development with an active community |
| Languages | Dart, Kotlin, Swift |
| Offers UI? | Yes, provides a camera widget |
| Input source? | Both live stream and static images |
| Developer resources | GitHub repository pub.dev package Integration tutorial |
How do I choose the right library?
The right choice of barcode scanner library depends on your project’s specific requirements. To make an informed decision, start by asking yourself the following questions:
- Which barcode symbologies do I need to scan?
Different libraries support different barcode types, and support can vary across platforms as well. Make sure the library you choose can handle all barcode formats your users may need to scan, including any niche or less common variants.
- Which platforms do I need to support?
If you’re building for multiple platforms, confirm that the library works reliably across all of them. Some features may be available on one platform but limited or missing on another.
- How consistent is performance across devices and platforms?
Scanning behavior can differ between devices, especially when a library depends on different underlying technologies on each platform. New devices and OS updates may also introduce unexpected issues.
- How active is development, and what support is available?
Free and open-source libraries rarely come with professional support, so check how frequently the library is updated, how quickly issues are resolved, and how active the community is.
- What is my budget and time investment?
Open-source libraries are free, but often require significant time for integration, debugging, and ongoing maintenance. Paid solutions offer professional support and ongoing development, which can be more cost-effective in the long run.
Choosing a Flutter barcode scanner library
While all three discussed libraries cover the basics of barcode scanning, they have their specific strengths and weaknesses.
- flutter_zxing: The best option when you need broad barcode coverage and built-in QR generation in a single package. However, keep in mind that it’s in maintenance mode which may cause performance and compatibility issues.
- google_mlkit_barcode_scanning: A solid choice when you don’t need Web support or GS1 parsing, and want consistent behavior across Android and iOS.
- mobile_scanner: The preferred option when you want quick integration, active development, and broad platform coverage – including macOS and Web.
The table below shows which barcodes the three libraries support. Note that mobile_scanner’s coverage varies slightly by platform.
| Barcode type | flutter_zxing | ML Kit | mobile_scanner (Android) | mobile_scanner (iOS/macOS) | mobile_scanner (Web) |
| UPC-A | ✅ Yes | ✅ Yes | ✅ Yes | ️ ⚠️ Decoding issue | ✅ Yes |
| UPC-E | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| EAN-8 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| EAN-13 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| ITF (Interleaved 2 of 5) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Code 39 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Code 93 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Code 128 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Codabar | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| MSI Plessey | ❌ No | ❌ No | ❌ No | ✅ Yes | ❌ No |
| GS1 DataBar | ✅ Yes | ❌ No | ❌ No | ✅ Yes | ✅ Yes |
| GS1 DataBar Expanded | ✅ Yes | ❌ No | ❌ No | ✅ Yes | ⌛ Under development |
| GS1 DataBar Limited | ❌ No | ❌ No | ❌ No | ✅ Yes | ❌ No |
| QR Code | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| rMQR Code | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |
| Micro QR Code | ✅ Yes | ❌ No | ❌ No | ✅ Yes | ❌ No |
| Data Matrix | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Aztec | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| PDF417 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Micro PDF417 | ❌ No | ❌ No | ❌ No | ✅ Yes | ❌ No |
| MaxiCode | ⚠️ Partial support | ❌ No | ❌ No | ❌ No | ❌ No |
Free or open-source barcode scanning libraries are a great fit for personal projects, prototypes, or apps where scanning plays only a small role. The popular options for Flutter generally perform well with clean, well-lit barcodes and offer a flexible, cost-free way to get started. But once you move into real-world environments – damaged labels, low light, awkward angles – their limitations become more apparent.
Cross-platform consistency can also be a hurdle. Since the Flutter plugins often rely on different libraries depending on the platform, decoding behavior can vary noticeably across Android, iOS, Web, and desktop. Ensuring stable performance requires extensive testing and ongoing maintenance. And when issues arise, support depends on community activity, which may be slow or unavailable, especially for projects that are no longer actively developed. Additionally, development on Google’s ML Kit or Apple’s VisionKit – which are free, but not open-source – depends on either corporation’s roadmap.
Commercial solutions fill all these gaps. They provide reliable performance across devices and operating systems, stay up to date with new OS releases, and are built to handle real-life scanning conditions. For professional applications where accuracy and speed are essential, a commercial SDK often turns out to be the more practical and cost-effective choice.
We’ve seen many teams take this path. The KROHNE Group, for example, initially used ZXing in its PICK app, but ran into slow and unreliable Data Matrix scans. After switching to the Scanbot Barcode Scanner SDK, they achieved the level of performance their workflows required.
“Switching to Scanbot SDK from ZXing significantly improved our ability to scan Data Matrix codes. We evaluated several solutions, and the Scanbot SDK provided the perfect blend of performance and value.”
– Benedikt Niermann, Process Improvement Officer at KROHNE Group
The Scanbot SDK at a glance
The Scanbot Barcode Scanner SDK delivers reliable, uniform performance across all supported platforms. Whether your users are on Android, iOS, or Web, you can expect the same scanning behavior and accuracy, regardless of device or OS version.
The SDK supports all common 1D and 2D barcode types, along with a range of specialized industry formats. Data parsers for standards such as GS1, AAMVA, and IATA boarding passes let you easily extract structured information without additional logic on your end.
All processing happens directly on the user’s device. This enables 100% offline functionality, ensures uninterrupted workflows, and simplifies compliance with data-privacy regulations like GDPR and CCPA – no external servers, and no tracking.
Integration and customization are straightforward thanks to ready-to-use UI components.
Pricing is simple as well: The Scanbot Barcode Scanning SDK comes at a flat annual fee for unlimited scans on unlimited devices, including support from an experienced technical team.

FAQ
What is the best barcode scanner library for Flutter?
It depends on your project’s needs. For enterprise applications, a commercial solution like the Scanbot SDK is the safer option. You can count on continuous development, professional technical support, and unmatched performance.
For less demanding applications, flutter_zxing, google_mlkit_barcode_scanning, and mobile_scanner are popular free libraries, but differ in platform support, barcode type support, and features.
How do I choose between open-source and commercial SDKs?
Commercial SDKs are recommended for professional apps where reliability, speed, and accuracy are critical, especially in challenging scanning environments or cross-platform deployments. Open-source libraries are great for prototypes or small projects with basic scanning requirements.
What are the benefits of open-source libraries?
Open-source software is free to use, making it a cost-effective option for personal projects or prototypes. Developers can modify and adjust the code to suit their needs, giving them full control over behavior and UI.
What are the risks of using open-source libraries?
Especially in production applications, open source carries risk. First, there is no guarantee development will be active. Many projects end up abandoned. This leaves you responsible for updates and bug fixes. Second, there is usually no official support, so you have to rely on community support for troubleshooting, which is typically slow and inconsistent. Third, new OS versions or devices can introduce compatibility issues, potentially causing costly problems if scans fail or performance suffers.