isHeadphonesConnected method
Implementation
@override
Future<bool> isHeadphonesConnected() async {
try {
final bool isConnected =
await methodChannel.invokeMethod('isHeadphonesConnected');
return isConnected;
} on PlatformException catch (e) {
print("Failed to check headphones connection: '${e.message}'.");
return false;
}
}