shell_run library

Classes

ProcessCmd
Shell
Multiplatform Shell utility to run a script with multiple commands. [...]

Properties

dartChannel String
Current dart platform channel
read-only
dartExecutable String
Get dart vm either from executable or using the which command
read-only
dartVersion Version
Current dart platform version
read-only
isFlutterSupported bool
read-only
isFlutterSupportedSync bool
true if flutter is supported
read-only
platformEnvironment Map<String, String>
Environment without debug VM_OPTIONS and without any user overrides [...]
read-only
sharedStdIn SharedStdIn
A shared singleton instance of dart:io's stdin stream. [...]
final
shellEnvironment Map<String, String>
Cached shell environment with user config Same as userEnvironment
@protected, read / write
userAppDataPath String
Returns the user data path [...]
read-only
userEnvironment Map<String, String>
Get the user environment [...]
read-only
userHomePath String
Return the user home path. [...]
read-only
userPaths List<String>
Get the list of user paths used to resolve binaries location. [...]
read-only

Functions

getFlutterBinChannel() Future<String>
Get flutter channel. (dev, beta, master, stable) [...]
getFlutterBinVersion() Future<Version>
Get flutter version. [...]
processCmd(String executable, List<String> arguments, {String workingDirectory, Map<String, String> environment, bool includeParentEnvironment = true, bool runInShell, Encoding stdoutEncoding = systemEncoding, Encoding stderrEncoding = systemEncoding}) ProcessCmd
processCmdToDebugString(ProcessCmd cmd) String
processResultToDebugString(ProcessResult result) String
prompt(String text, {Stream<List<int>> stdin}) Future<String>
Get text
promptConfirm(String text, {Stream<List<int>> stdin}) Future<bool>
Confirm action
promptTerminate() Future
Terminate a prompt session.
run(String script, {bool throwOnError = true, String workingDirectory, Map<String, String> environment, bool includeParentEnvironment = true, bool runInShell, Encoding stdoutEncoding = systemEncoding, Encoding stderrEncoding = systemEncoding, Stream<List<int>> stdin, StreamSink<List<int>> stdout, StreamSink<List<int>> stderr, bool verbose = true, bool commandVerbose, bool commentVerbose}) Future<List<ProcessResult>>
Run one or multiple plain text command(s). [...]
shellArgument(String argument) String
Use to safely enclose an argument if needed
userLoadEnv({Map<String, String> vars, List<String> paths}) → void
Only specify the vars to override and the paths to add
userLoadEnvFile(String path) → void
Update userPaths and userEnvironment

Exceptions / Errors

ShellException
Exception thrown in exitCode != 0 and throwOnError is true