Progress class abstract
central class that provides progress information about a running process.
Constructors
- Progress(LineAction stdout, {LineAction stderr = devNull, bool captureStdout = false, bool captureStderr = false})
-
factory
- Progress.capture({bool captureStdout = true, bool captureStderr = true})
-
Captures the output of the called process to a list which
can be obtained by calling Progress.lines once
the process completes.
By default both stdout and stderr are captured.
Set
captureStdout
to false to suppress capturing of stdout. SetcaptureStderr
to false to suppress capturing of stderr.factory - Progress.devNull()
-
Use this progress to have both stdout and stderr output
suppressed.
factory
- Progress.print({bool capture = false})
-
Use this progress to print both stdout and stderr.
If
capture
is true (defaults to false) the output to stdout and stderr is also captured and will be available in lines once the process completes.factory - Progress.printStdErr({bool capture = false})
-
Use this progress to only output data sent to stderr.
If
capture
is true (defaults to false) the output to stderr is also captured and will be available in lines once the process completes.factory - Progress.printStdOut({bool capture = false})
-
Use this progress to only output data sent to stdout.
If
capture
is true (defaults to false) the output to stdout is also captured and will be available in lines once the process completes.factory - Progress.stream({bool includeStderr = false})
-
factory
Properties
- exitCode → int?
-
no setter
- firstLine → String?
-
Returns the first line from the command or
null if no lines where generated
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
lines
→ List<
String> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
List< int> > -
no setter
Methods
-
forEach(
void print(String line)) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toList(
) → List< String> -
toParagraph(
) → String -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited