Orientação gerada a partir de informações públicas. Apenas para referência.
Um plugin Flutter que habilita a leitura de códigos de barras e QR codes em dispositivos Android e iOS. Ele fornece uma interface simples e confiável para capturar e decodificar vários tipos de códigos de barras, incluindo QR codes, EAN, UPC e mais. Construído com integração nativa, garante desempenho rápido e preciso de escaneamento em todas as plataformas. O pacote é ideal para aplicações que exigem entrada rápida de dados por meio de códigos visuais, como sistemas de inventário, bilhetagem ou ferramentas de busca de produtos.
Casos de uso
Gestão de estoque
Escaneamento de ingressos
Consulta de informações do produto
Autenticação de usuário por códigos QR
Pagamentos móveis
Principais recursos
Suporta múltiplos formatos de código de barras
Compatibilidade multiplataforma (Android e iOS)
Digitalização de alta velocidade
Integração simples da API
Suporte de visualização em tempo real
Indicado para
Aplicativos de varejo
Sistemas de bilhetagem de eventos
Logística e armazenamento
Soluções de pagamento móvel
verificação de identidade digital
Considerações
Requer permissões de câmera
Pode ser necessário configurar execução em segundo plano
O desempenho varia conforme o hardware do dispositivo
Limitado a plataformas móveis
Configuração adicional para acesso à câmera do iOS
README original
Snapshot do README original do repositório-fonte vinculado. Consulte o repositório para o conteúdo mais recente.
flutter_barcode_scanner_plus
A plugin for Flutter apps that adds barcode scanning support on both Android and iOS.
Try example
Just clone or download the repository, open the project in Android Studio/ VS Code, open pubspec.yaml and click on Packages get.
Connect device and hit run.
To run on iPhone you need to run from Xcode first time and just make pod install in example/ios then run from Xcode.
Getting Started
Follow the steps for Android and iOS
PLEASE FOLLOW iOS STEPS CAREFULLY
Android
:zap: Don't worry, you don't need to do anything.
iOS - Requires Swift support
Deployment target : 12
1. Fresh start:
Create a new flutter project. Please check for Include swift support for iOS code.
After creating new flutter project open /ios project in Xcode and set minimum deployment target to 12
and set Swift version to 5.
After setting up the deployment target and swift version, close the Xcode then run pod install in /ios in flutter project.
You have done with basic configuration now proceed to section How to use.
2. Adding to existing flutter app:
If your existing ios code is Swift then you just need to do following.
Set minimum deployment target to 12 and set Swift version to 5.
Close the Xcode and run pod install in /ios in flutter project.
Now proceed to section How to use.
If your existing ios code is Objective-C then you need to do following.
Create a new flutter project with same name at different location (Don't forget to check Include swift support for iOS code while creating)
Just copy newly created /ios folder from project and replace with existing /ios.
Open ios project in Xcode and set minimum deployment target to 12 and set Swift version to 5.
Run pod install in /ios
Note: If you did any changes in ios part before, you might need to make these configuration again
How to use ?
To use on iOS, you will need to add the camera usage description.
To do that open the Xcode and add camera usage description in Info.plist.
COLOR_CODE is hex-color which is the color of line in barcode overlay you can pass color of your choice,
CANCEL_BUTTON_TEXT is a text of cancel button on screen you can pass text of your choice and language,
isShowFlashIcon is bool value used to show or hide the flash icon,
scanMode is a enum in which user can pass any of { QR, BARCODE, DEFAULT }, if nothing is passed it will consider a default value which will be QR.
It shows the graphics overlay like for barcode and QR.
NOTE: Currently, scanMode is just to show the graphics overlay for barcode and QR. Any of this mode selected will scan both QR and barcode.
Continuous scan
If you need to scan barcodes continuously without closing camera use FlutterBarcodeScanner.getBarcodeStreamReceiver
params will be same like FlutterBarcodeScanner.scanBarcode
e.g.
FlutterBarcodeScanner.getBarcodeStreamReceiver("#ff6666", "Cancel", false, ScanMode.DEFAULT)
.listen((barcode) {
/// barcode to be used
});
Contribution:
would :heart: to see any contribution, give :star: if you like