Permission handler Bluetooth scan not working below 12
00:12 16 Jan 2025

I am using this code to handle Bluetooth scan, but in Android 11, if my Bluetooth is not on, and location permission is also not granted, yet it is showing permission granted. If I go to App permissions in settings, I see no permission granted.

Here is the code:

Future requestBluetoothPermission() async {
   var status = await Permission.bluetoothScan.request();
   if (status.isGranted) {
      print("Bluetooth scan permission granted");
   } else if (status.isDenied) {
      await Permission.bluetooth.request();
   } else if (status.isPermanentlyDenied) {
      await openAppSettings();
   } else {
      print("Bluetooth scan permission denied");
   }
}
flutter