mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
ignore exceptions from stdin.lineMode (#7439)
* ignore exceptions from stdin.lineMode * only catch IOException
This commit is contained in:
parent
5a9063f55c
commit
7f2915d331
@ -221,7 +221,11 @@ class AnsiTerminal {
|
||||
String clearScreen() => supportsColor ? _clear : '\n\n';
|
||||
|
||||
set singleCharMode(bool value) {
|
||||
stdin.lineMode = !value;
|
||||
try {
|
||||
stdin.lineMode = !value;
|
||||
} on IOException {
|
||||
// This can throw for some terminals; we ignore the error.
|
||||
}
|
||||
}
|
||||
|
||||
/// Return keystrokes from the console.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user