input method
Returns a String of input read from the Console until a line feed character was found.
final input = console.input(secure: false);
print('You typed: $input');
If secure
is true
, the input will not be echoed to the console.
Implementation
@override
String input({bool secure = false}) {
didOutputLines(1);
stdin.echoMode = !secure;
return stdin.readLineSync() ?? '';
}