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})

Properties

encoding Encoding
latefinal
hashCode int
The hash code for this object.
no setterinherited
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

Operators

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