getPermissions method
Implementation
Future<void> getPermissions() async {
// You can request multiple permissions at once.
// if (await Permission.location.isGranted &&
// await Permission.bluetooth.isGranted &&
// Permission.bluetoothAdvertise.isGranted &&
// Permission.bluetoothConnect.isGranted &&
// Permission.bluetoothScan.isGranted) return;
Map<Permission, PermissionStatus> statuses = await [
Permission.location,
Permission.bluetooth,
Permission.bluetoothAdvertise,
Permission.bluetoothConnect,
Permission.bluetoothScan,
].request();
// print(statuses[Permission.location]);
// print(statuses[Permission.bluetooth]);
// print(statuses[Permission.bluetoothAdvertise]);
// print(statuses[Permission.bluetoothConnect]);
// print(statuses[Permission.bluetoothScan]);
}