sendDataToSwift method
Implementation
Future<String> sendDataToSwift(String data) async {
try {
final String result =
await _channel.invokeMethod('processData', {'data': data});
return result;
} on PlatformException catch (e) {
return "Failed to get response: '${e.message}'.";
}
}