Shell class final

Executes a program in the systems command line.

Inheritance

Constructors

Shell({required String name, required String program, required List<String> arguments, FutureOr<void> onStdout(FlowContext context, List<int> chars)?, FutureOr<void> onStderr(FlowContext context, List<int> chars)?, bool runAsAdministrator = false, bool runInShell = false, String? workingDirectory})
Default const constructor.
const

Properties

arguments List<String>
The command line arguments that should be applied to the command invocation.
final
hashCode int
The hash code for this object.
no setterinherited
name String
Tag describing whatever this Shell does.
final
onStderr FutureOr<void> Function(FlowContext context, List<int> chars)?
Function that will be executed every time the process' stderr receives text.
final
onStdout FutureOr<void> Function(FlowContext context, List<int> chars)?
Function that will be executed every time the process' stdout receives text.
final
program String
The name of the executable that should be invoked. Can be relative to the workingDirectory or available in the systems path variable.
final
runAsAdministrator bool
If the program should be ran with elevated privileges.
final
runInShell bool
If the program should be run in the systems command shell.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uuid → Uuid
UUID for the placeholder file on windows.
final
workingDirectory String?
Directory where the command line will be started from.
final

Methods

configure() Step
Composes Steps into one unit to enable more modular and understandable workflows.
override
execute(FlowContextController controller, [FutureOr<Step?> candidate()?]) FutureOr<Step?>
A ConfigureStep will just executes it's underlying Steps of configure().
inherited
getArguments() List<String>
Returns formatted arguments.
getProcess() Future<Process>
Returns the composed process that will be started.
getProgram() String
Receives the command's first argument. (The program's name)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited