Progress class
central class that provides progress information about a running process.
Constructors
- Progress(LineAction stdout, {LineAction stderr = devNull})
- Progress.devNull()
- Use this progress to have both stdout and stderr output suppressed.
- Progress.print()
- Use this progress to print both stdout and stderr
- Progress.printStdErr()
- Use this progress to only output data sent to stderr
- Progress.printStdOut()
- Use this progress to only output data sent to stdout
- Progress.stream({bool includeStdout = true, bool includeStderr = true})
- EXPERIMENTAL
Properties
- exitCode ↔ int?
-
The exist code of the completed process.
getter/setter pair
- firstLine → String?
-
Returns the first line from the command or
null if no lines where returned
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeStderr → bool
-
TODO: setting includeStderr or includeStdout
to false stop methods like toList from working.
I've not quite got my head around why so for the minute
we only set this settings to false when using Progress.stream.
If true then lines written to stderr will
be included in the stream.
final
- includeStdout → bool
-
If true then lines written to stdout will
be included in the stream.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
String> -
Returns a combined stream including stdout and stderr.
You control whether stderr and/or stdout are inserted into the stream when you call
stream(includeStderr: true, includeStdout)
no setter
Methods
-
addToStderr(
String line) → void -
adds the
line
to the stderr controller -
addToStdout(
String line) → void -
adds the
line
to the stdout controller -
close(
) → void - closes the progress.
-
forEach(
LineAction stdout, {LineAction stderr = devNull}) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onError(
RunException error) → void - Sends or enqueues an error event.
-
toList(
{int skipLines = 0}) → List< String> - Returns stdout and stderr lines as a list.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited