diff --git a/src/flutter/lib/Screens/Scan.dart b/src/flutter/lib/Screens/Scan.dart index b451a08..5743c25 100644 --- a/src/flutter/lib/Screens/Scan.dart +++ b/src/flutter/lib/Screens/Scan.dart @@ -1,29 +1,10 @@ -// import 'dart:async'; import 'package:flutter/material.dart'; import 'package:qr_mobile_vision/qr_camera.dart'; -// import 'package:flutter/services.dart'; - -// import 'package:barcode_scan/barcode_scan.dart'; import '../Components/BG.dart'; import '../Components/SyncIcon.dart'; class Scan extends StatelessWidget { - // Future scan() async { - // try { - // String barcode = await BarcodeScanner.scan(); - // print('Success'); - // print(barcode); - // Navigator.pushNamed(null, '/home'); - // } on PlatformException catch (e) { - // if (e.code == BarcodeScanner.CameraAccessDenied) - // print('The user did not grant the camera permission!'); - // } catch (e) { - // print('Nope'); - // print(e); - // } - // } - @override Widget build(BuildContext context) => BG( child: Center( diff --git a/src/flutter/lib/main_new.dart b/src/flutter/lib/main_new.dart deleted file mode 100644 index dcdced3..0000000 --- a/src/flutter/lib/main_new.dart +++ /dev/null @@ -1,46 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/material.dart'; -import 'package:qr_reader/qr_reader.dart'; - -void main() { - runApp(MaterialApp( - home: MyHomePage(), - )); -} - -class MyHomePage extends StatefulWidget { - @override - createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - Future _barcodeString; - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Center( - child: FutureBuilder( - future: _barcodeString, - builder: (BuildContext context, AsyncSnapshot snapshot) { - return Text(snapshot.data != null ? snapshot.data : ''); - })), - floatingActionButton: FloatingActionButton( - onPressed: () { - setState(() { - _barcodeString = QRCodeReader() - .setAutoFocusIntervalInMs(200) - .setForceAutoFocus(true) - .setTorchEnabled(false) - .setHandlePermissions(true) - .setExecuteAfterPermissionGranted(true) - .scan(); - }); - }, - tooltip: 'Reader the QRCode', - child: Icon(Icons.add_a_photo), - ), - ); - } -} diff --git a/src/flutter/pubspec.lock b/src/flutter/pubspec.lock index 1f4d38d..10d6d78 100644 --- a/src/flutter/pubspec.lock +++ b/src/flutter/pubspec.lock @@ -263,13 +263,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.0.7" - qr_reader: - dependency: "direct main" - description: - name: qr_reader - url: "https://pub.dartlang.org" - source: hosted - version: "0.1.3" quiver: dependency: transitive description: diff --git a/src/flutter/pubspec.yaml b/src/flutter/pubspec.yaml index b40d7e5..8397352 100644 --- a/src/flutter/pubspec.yaml +++ b/src/flutter/pubspec.yaml @@ -15,9 +15,7 @@ environment: dependencies: flutter: sdk: flutter - # barcode_scan: ^0.0.6 qr_mobile_vision: any - qr_reader: ^0.1.3 flutter_local_notifications: any # The following adds the Cupertino Icons font to your application.