From 0fe16b5ac9ad1bded5a252e1770239157c51bae4 Mon Sep 17 00:00:00 2001 From: error500 Date: Mon, 11 Oct 2021 17:12:53 +0600 Subject: [PATCH] and fix printer permissions --- android/app/src/main/AndroidManifest.xml | 6 +----- lib/views/settings/setting_printer_view.dart | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index dbd59eb..6c9b830 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -10,13 +10,9 @@ - - - - - + { //только для Android void _permission() async { if( Platform.isAndroid) { - var status = await Permission.locationAlways.status; + var status = await Permission.location.status; log.i(status); if (status.isUndetermined || status.isDenied || status.isPermanentlyDenied) { DialogResponse response = await _dialogService.showConfirmationDialog( @@ -174,7 +174,7 @@ class _SettingPrinterViewState extends State { confirmationTitle: 'Хорошо', ); if (response.confirmed) { - if (await Permission.locationAlways + if (await Permission.location .request() .isGranted) { print('Granted');