current property
Cli
get
current
The console of the Cli.run the caller runs in, else one on the process's stdio, made the first time it is asked for.
The default one is never closed by anybody: a program that shows a widget through it in the interactive mode has to close it, as Cli.run does, or its inline session keeps stdin open.
Implementation
// ignore: prefer_constructors_over_static_methods, the zone's, made once
static Cli get current =>
Zone.current[_zoneKey] as Cli? ?? (_default ??= Cli());