StdExtension extension

Extension to simulate Java's System.out and System.err utilities in Dart.

Adds helper methods to Stdout for convenient output printing, such as:

  • println()
  • printf()
  • printErr()

Example usage:

stdout.println("Hello, world!");
stdout.printf('Welcome, %s. You have %d messages.\n', ['John', 5]);
stdout.printErr("Something went wrong.");
on

Methods

print(String message) → void

Available on Stdout, provided by the StdExtension extension

Prints a string without a newline (like System.out.print)
printErr(Object? message) → void

Available on Stdout, provided by the StdExtension extension

Prints to stderr with a newline.
printf(String format, List<Object?> args) → void

Available on Stdout, provided by the StdExtension extension

Prints a formatted string using Dart's string interpolation. Simulates Java-style printf.
println([Object? message = '']) → void

Available on Stdout, provided by the StdExtension extension

Prints a string followed by a newline (like System.out.println)