executeResult method
Executes an external command and returns the output lines.
command
the external command, e.g. "apt-get"
arguments
the program arguments, e.g. 'show', 'my-package'
Implementation
Future<List<String>> executeResult(
String command, List<String> arguments) async {
var rc = <String>[];
var result = await Process.run(command, arguments);
final data = result.stdout;
if (data is String) {
rc = data.split('\n');
} else {
rc = data;
}
return rc;
}