Shell class final

Executes a program in the systems command line.

Inheritance

Constructors

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

Properties

arguments List<String>
The command line arguments that should be applied to the command invocation.
final
description String
finalinherited
hashCode int
The hash code for this object.
no setterinherited
name String
finalinherited
onStderr FutureOr<void> Function(List<int> chars, FlowContext context)?
Function that will be executed every time the process' stderr receives text.
final
onStdout FutureOr<void> Function(List<int> chars, FlowContext context)?
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
override
execute(FlowContext context) FutureOr<Response?>
inherited
getArguments() List<String>
On windows the powershell is required to acquire elevated privileges.
getProcess() Future<Process>
getProgram() String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

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