getConnectedDevice method
Implementation
@override
Future<List<String>?> getConnectedDevice() async {
try {
final List<dynamic>? info = await methodChannel.invokeMethod(
"getConnectedDevice",
);
return info?.map((e) => e.toString()).toList();
} on PlatformException catch (e) {
debugPrint("Failed to get connected device: ${e.message}");
return null;
}
}