mirror of
https://github.com/wownero/cyberwow.git
synced 2026-10-17 15:31:47 +02:00
use linesplitter on stdout
This commit is contained in:
@@ -75,7 +75,7 @@ build:
|
||||
|
||||
build-debug:
|
||||
cd cyberwow && \
|
||||
flutter build apk --debug --target-platform android-arm64 -v
|
||||
flutter build apk --debug --target-platform android-arm64
|
||||
|
||||
install: build
|
||||
cd cyberwow && \
|
||||
|
||||
@@ -79,7 +79,11 @@ Stream<String> runBinary
|
||||
if (input != null) {
|
||||
printInput();
|
||||
}
|
||||
await for (final line in outputProcess.stdout.transform(utf8.decoder)) {
|
||||
|
||||
final _stdout = outputProcess.stdout
|
||||
.transform(utf8.decoder).transform(const LineSplitter());
|
||||
|
||||
await for (final line in _stdout) {
|
||||
log.finest('process output: ' + line);
|
||||
yield line;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ class SyncedState extends AppState {
|
||||
}
|
||||
|
||||
void appendInput(final String line) {
|
||||
stdout.addLast(config.c.promptString + line + '\n');
|
||||
stdout.addLast(config.c.promptString + line);
|
||||
syncState();
|
||||
processInput.add(line);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import 'exiting.dart';
|
||||
|
||||
|
||||
class SyncingState extends AppState {
|
||||
final Queue<String> stdout = Queue.from(['']);
|
||||
final Queue<String> stdout = Queue();
|
||||
|
||||
bool synced = false;
|
||||
|
||||
|
||||
@@ -278,7 +278,7 @@ Widget terminalView(BuildContext context, String title, SyncedState state) {
|
||||
|
||||
Text
|
||||
(
|
||||
state.stdout.join(),
|
||||
state.stdout.join('\n'),
|
||||
style: Theme.of(context).textTheme.body2,
|
||||
)
|
||||
],
|
||||
|
||||
@@ -52,7 +52,7 @@ Widget build(BuildContext context, SyncingState state) {
|
||||
reverse: true,
|
||||
child: Text
|
||||
(
|
||||
state.stdout.join(),
|
||||
state.stdout.join('\n'),
|
||||
style: Theme.of(context).textTheme.body1,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user