79415336

Date: 2025-02-05 15:51:08
Score: 1.5
Natty:
Report link

Thank you @Sudip Mahanta. your post saved me from continuing my 2 days of debugging hell.

Here's what I ended up with:

static const androidPermissions = [
    Permission.bluetoothScan,
    Permission.bluetoothConnect,
    Permission.bluetoothAdvertise,
  ];

  static const iosPermissions = [
    Permission.bluetooth,
  ];

  /// Gets the required permissions based on the platform.
  static List<Permission> get requiredPermissions {
    if (Platform.isIOS) {
      return iosPermissions;
    } else {
      return androidPermissions;
    }
  }
Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Sudip
  • Low reputation (1):
Posted by: semioniy