checkP2pPermissions method
Checks if the necessary Wi-Fi P2P (Wi-Fi Direct) permissions are granted.
Permissions may include Location and Nearby Devices depending on the platform version.
Returns a Future completing with true
if permissions are granted, false
otherwise.
Implementation
@override
Future<bool> checkP2pPermissions() async {
final bool? hasPermission =
await methodChannel.invokeMethod('checkP2pPermissions');
return hasPermission ?? false;
}