writeToStream method
Implementation
@override
Future<String?> writeToStream(List<int> byte) async {
try {
await methodChannel.invokeMethod<String?>('writeToPipe', {"chunk": byte});
} on PlatformException catch (e) {
debugPrint("Sending PCM Error 1: ${e.code}, ${e.message}");
return e.message;
}
return null;
}