connectToPC method

  1. @override
Future<String?> connectToPC(
  1. String address
)
override

Implementation

@override
Future<String?> connectToPC(String address) async {
  try {
    debugPrint("Device connecting ");
    final out = await methodChannel.invokeMethod('connectDevice', {
      'address': address,
    });
    debugPrint("Device connected");
    return out;
  } on PlatformException catch (e) {
    debugPrint("Failed: ${e.message}");
    return "Error";
  }
}