simple_barcode_scanner_flutterflow 0.0.13 simple_barcode_scanner_flutterflow: ^0.0.13 copied to clipboard
Version of simple_barcode_scanner built for Flutterflow
simple_barchode_scanner_flutterflow #
This is a fork of simple_barcode_scanner
that was built to be compatible with FlutterFlow.
Getting started #
simple_barcode_scanner_flutterflow: ^0.0.12
Import the library:
import 'package:simple_barcode_scanner_flutterflow/simple_barcode_scanner_flutterflow.dart';
Usage #
// Begin custom widget code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
import 'package:simple_barcode_scanner_flutterflow/simple_barcode_scanner_flutterflow.dart';
class SimpleBarcodeScanner extends StatefulWidget {
const SimpleBarcodeScanner({
super.key,
this.width,
this.height,
});
final double? width;
final double? height;
@override
State<SimpleBarcodeScanner> createState() => _SimpleBarcodeScannerState();
}
class _SimpleBarcodeScannerState extends State<SimpleBarcodeScanner> {
String result = '';
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ElevatedButton(
onPressed: () async {
var res = await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const SimpleBarcodeScannerPage(),
));
setState(() {
if (res is String) {
result = res;
}
});
},
child: const Text('Open Scanner'),
),
Text('Barcode Result: $result'),
],
),
),
);
}
}
Original README below #
simple_barcode_scanner #
simple_barcode_scanner that let you scan barcode and qr code in mobile,web and windows.
Demo #
Android | IOS |
---|---|
Window | Web |
---|---|
Features #
- Scan barcode in mobile devices using flutter_barcode_scanner
- Scan barcode in web/window using html5-qrcode package
Installation and configuration #
- Mobile device uses flutter_barcode_scanner. refer flutter_barcode_scanner for installation and setup
- Web uses html5-qrcode on IFrameElement. Setup is not required. For more you can read html5-qrcode
- Window uses html5-qrcode on webview_windows.
Getting started #
simple_barcode_scanner: ^0.0.8
Import the library:
import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
Usage #
ElevatedButton(
onPressed: () async {
var res = await Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const SimpleBarcodeScannerPage(),
));
setState(() {
if (res is String) {
result = res;
}
});
},
child: const Text('Open Scanner'),
)
Todo #
- Flash and switch camera are only available in mobile devices
- Enhancement
Note #
Feel free to fork and send pull request. If you have any questions, feedback or ideas,You can create an issue. If you enjoy this project, I'd appreciate your 🌟 on GitHub.