sharedStdIn top-level property Null safety

SharedStdIn sharedStdIn
final

A shared singleton instance of dart:io's stdin stream.

Unlike the normal stdin stream, sharedStdIn may switch subscribers as long as the previous subscriber cancels before the new subscriber starts listening.

SharedStdIn.terminate must be invoked in order to close the underlying connection to stdin, allowing your program to close automatically without hanging.

Implementation

final SharedStdIn sharedStdIn = SharedStdIn(stdin);