Try to solve permission ios
This commit is contained in:
parent
3341e0dfe5
commit
eb1e9b2547
@ -327,20 +327,57 @@ class _VisitPageState extends State<VisitPage> with WidgetsBindingObserver {
|
|||||||
|
|
||||||
if(!controller.authorizationStatusOk) {
|
if(!controller.authorizationStatusOk) {
|
||||||
//await handleOpenLocationSettings();
|
//await handleOpenLocationSettings();
|
||||||
Map<Permission, PermissionStatus> statuses = await [
|
|
||||||
Permission.bluetoothScan,
|
|
||||||
Permission.bluetoothConnect,
|
|
||||||
Permission.location,
|
|
||||||
].request();
|
|
||||||
print("STATUUSSSS ? ");
|
print("STATUUSSSS ? ");
|
||||||
|
|
||||||
print(statuses[Permission.bluetoothScan]);
|
if(Platform.isIOS) {
|
||||||
print(statuses[Permission.bluetoothConnect]);
|
Map<Permission, PermissionStatus> statuses0 = await [
|
||||||
print(statuses[Permission.location]);
|
Permission.bluetooth,
|
||||||
|
].request();
|
||||||
|
|
||||||
var status = await Permission.bluetoothScan.status;
|
Map<Permission, PermissionStatus> statuses1 = await [
|
||||||
|
Permission.bluetoothScan,
|
||||||
|
].request();
|
||||||
|
|
||||||
|
Map<Permission, PermissionStatus> statuses2 = await [
|
||||||
|
Permission.bluetoothConnect,
|
||||||
|
].request();
|
||||||
|
|
||||||
|
Map<Permission, PermissionStatus> statuses3 = await [
|
||||||
|
Permission.locationWhenInUse,
|
||||||
|
].request();
|
||||||
|
|
||||||
|
Map<Permission, PermissionStatus> statuses4 = await [
|
||||||
|
Permission.location,
|
||||||
|
].request();
|
||||||
|
|
||||||
|
Map<Permission, PermissionStatus> statuses5 = await [
|
||||||
|
Permission.locationAlways,
|
||||||
|
].request();
|
||||||
|
|
||||||
|
print(statuses0[Permission.bluetooth]);
|
||||||
|
print(statuses1[Permission.bluetoothScan]);
|
||||||
|
print(statuses2[Permission.bluetoothConnect]);
|
||||||
|
print(statuses3[Permission.locationWhenInUse]);
|
||||||
|
print(statuses4[Permission.location]);
|
||||||
|
print(statuses5[Permission.locationAlways]);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
Map<Permission, PermissionStatus> statuses = await [
|
||||||
|
Permission.bluetoothScan,
|
||||||
|
Permission.bluetoothConnect,
|
||||||
|
Permission.location,
|
||||||
|
].request();
|
||||||
|
|
||||||
|
print(statuses[Permission.bluetoothScan]);
|
||||||
|
print(statuses[Permission.bluetoothConnect]);
|
||||||
|
print(statuses[Permission.location]);
|
||||||
|
print(statuses[Permission.locationWhenInUse]);
|
||||||
|
|
||||||
|
var status = await Permission.bluetoothScan.status;
|
||||||
|
print(status);
|
||||||
|
}
|
||||||
|
|
||||||
print(status);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user