【发布时间】:2019-06-06 11:13:28
【问题描述】:
我正在 Flutter 中制作条形码扫描仪应用程序
跟随_scanQR()函数打开相机并扫描条形码并将结果存储在qrResult String中。
我希望在没有任何按钮 onPress 事件的情况下打开我的应用程序并且在扫描条形码后应该设置 GUI 时执行此功能。
Future _scanQR() async {
String qrResult = await BarcodeScanner.scan();
setState(() {
result = qrResult;
});
}
【问题讨论】:
标签: flutter dart barcode flutter-layout