ShellLinesController class

Basic shell lines controller.

Usage:

var controller = ShellLinesController();
var shell = Shell(stdout: controller.sink, verbose: false);
controller.stream.listen((event) {
  // Handle output

  // ...

  // If needed kill the shell
  shell.kill();
});
try {
  await shell.run('dart echo.dart some_text');
} on ShellException catch (_) {
  // We might get a shell exception
}

Constructors

ShellLinesController({Encoding? encoding})
Create a shell lines controller.

Properties

done Future<void>
Future when done
no setter
encoding Encoding
Encoding to use
latefinal
hashCode int
The hash code for this object.
no setterinherited
isClosed bool
True if the controller is closed.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sink StreamSink<List<int>>
The sink for the Shell stderr/stdout
no setter
stream Stream<String>
The stream to listen to
no setter

Methods

close() → void
Dispose the controller.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
write(String message) → void
Write a string with the specified encoding.
writeln(String message) → void
Write a line.

Operators

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