shell_command_flutter

pub package

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

  1. Support for MacOS and Linux
  2. Reduce delay in long output commands

Libraries

shell_command_flutter