# ConsolePrintStream class

A concrete implementation of PrintStream that writes to the console using stdout.

`ConsolePrintStream` provides a high-level abstraction over `stdout`, offering utility methods like `write`, `writeln`, `newline`, `flush`, and `close`.

By default, it uses `stdout.nonBlocking` for efficient, non-blocking output, but you can also provide a custom IOSink to redirect output (e.g., to a file).

### 📦 Example Usage:

    final stream = ConsolePrintStream();
    stream.write('Hello');
    stream.writeln(' world');
    stream.newline();
    stream.flush();
    await stream.close();

This class is useful when abstracting over console or file output in logging systems, REPLs, shell interfaces, and testable I/O components.

Implemented types
  - PrintStream

## Constructors

ConsolePrintStream.new([IOSink? sink])
  A concrete implementation of PrintStream that writes to the console using stdout.

## Properties

hashCode → int
  The hash code for this object.
  no setter inherited
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited

## Methods

close() → Future<void>
  An abstract interface representing a stream for formatted text output.
  override
flush() → void
  An abstract interface representing a stream for formatted text output.
  override
newline() → void
  An abstract interface representing a stream for formatted text output.
  override
noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
print(Object? obj) → void
  An abstract interface representing a stream for formatted text output.
  override
println([Object? obj]) → void
  An abstract interface representing a stream for formatted text output.
  override
toString() → String
  A string representation of this object.
  inherited

## Operators

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