USB Serial Communication Command

I’m developing an app where I need to communicate with a device through USB serial Communication.
How can I execute the command “test-1 -r” through my flutter application.

onPressed: _port == null
? null
: () async {
if (_port == null) {
return;
}
//String data = “test-1 -r” + “\r\n”; //Doesn’t work
//String data = “test-1” + “\r\n”; //It works
String data = “test1” + “\r\n”; //It works
await _port.write(Uint8List.fromList(data.codeUnits));
},