getConnectedBluetoothDevice method
Implementation
@override
Future<EspBluetoothDevice?> getConnectedBluetoothDevice() async {
try {
final result = await methodChannel.invokeMethod<Map?>('getConnectedBLEDevice');
if (result != null) {
final data = Map<String, dynamic>.from(result);
return EspBluetoothDevice.fromJson(data);
}
} catch (e) {
rethrow;
}
return null;
}