update
This commit is contained in:
parent
11fc5c43bf
commit
41651ae447
13 changed files with 237 additions and 125 deletions
19
lib/functions/barcode_scan_function.dart
Normal file
19
lib/functions/barcode_scan_function.dart
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:simple_barcode_scanner/simple_barcode_scanner.dart';
|
||||
|
||||
Future<String> barcodeScan(BuildContext context) async {
|
||||
String? barcode = await SimpleBarcodeScanner.scanBarcode(
|
||||
context,
|
||||
// barcodeAppBar: const BarcodeAppBar(
|
||||
// // appBarTitle: 'Test',
|
||||
// // centerTitle: false,
|
||||
// // enableBackButton: false,
|
||||
// // backButtonIcon: Icon(Icons.arrow_back_ios),
|
||||
// ),
|
||||
// isShowFlashIcon: true,
|
||||
delayMillis: 2000,
|
||||
scanType: ScanType.barcode,
|
||||
cameraFace: CameraFace.back,
|
||||
);
|
||||
return barcode != '-1' ? barcode ?? '' : '';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue