shell_command_flutter 1.0.0 shell_command_flutter: ^1.0.0 copied to clipboard
Execute the Native commands with respect to platform like Windows,MacOS,Linux
shell_command_flutter #
shell_command execute the Native commands with respect to platform like Windows,MacOS,Linux
The result is inResultSet
with code
and response
from terminal.
Currently Windows is supported. I am working on other OS, soon will update package
Usage #
To use this plugin, add shell_command_flutter
as a dependency in your pubspec.yaml file.
###Example
void execute() {
runCommand("flutter doctor",outputType: outputType).then((result) {
print("STATUS CODE ${result.code}");
print("RESPONSE ${result.output}");
}).catchError((error) {});
}
ShellCommand #
ShellCommand.CMD_STATUS_CODE
default, return status code of the command executed like -1, 0, 1 ..
ShellCommand.CMD_RESPONSE
return status code as well as command output also
Upcoming #
- Support for MacOS and Linux
- Reduce delay in long output commands