mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-14 12:06:24 +00:00
Adjust calls in barcode.dart to match example
This commit is contained in:
parent
efce514be3
commit
058cde1d3d
1 changed files with 6 additions and 5 deletions
|
|
@ -489,6 +489,8 @@ class InvenTreeQRView extends StatefulWidget {
|
||||||
|
|
||||||
class _QRViewState extends State<InvenTreeQRView> {
|
class _QRViewState extends State<InvenTreeQRView> {
|
||||||
|
|
||||||
|
final GlobalKey qrKey = GlobalKey(debugLabel: 'QR');
|
||||||
|
|
||||||
QRViewController? _controller;
|
QRViewController? _controller;
|
||||||
|
|
||||||
final BarcodeHandler _handler;
|
final BarcodeHandler _handler;
|
||||||
|
|
@ -500,17 +502,16 @@ class _QRViewState extends State<InvenTreeQRView> {
|
||||||
@override
|
@override
|
||||||
void reassemble() {
|
void reassemble() {
|
||||||
super.reassemble();
|
super.reassemble();
|
||||||
|
|
||||||
if (Platform.isAndroid) {
|
if (Platform.isAndroid) {
|
||||||
_controller?.pauseCamera();
|
_controller!.pauseCamera();
|
||||||
} else if (Platform.isIOS) {
|
|
||||||
_controller?.resumeCamera();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_controller!.resumeCamera();
|
||||||
}
|
}
|
||||||
|
|
||||||
_QRViewState(this._handler) : super();
|
_QRViewState(this._handler) : super();
|
||||||
|
|
||||||
final GlobalKey qrKey = GlobalKey(debugLabel: 'QR');
|
|
||||||
|
|
||||||
void _onViewCreated(QRViewController controller) {
|
void _onViewCreated(QRViewController controller) {
|
||||||
_controller = controller;
|
_controller = controller;
|
||||||
controller.scannedDataStream.listen((barcode) {
|
controller.scannedDataStream.listen((barcode) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue