move the analysis_options to a file
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
@@ -14,14 +15,14 @@ Process daemon;
|
||||
// stopAll: stop any running app
|
||||
// devices: list devices
|
||||
|
||||
main() async {
|
||||
Future main() async {
|
||||
daemon = await Process.start('flutter', ['daemon']);
|
||||
print('daemon process started, pid: ${daemon.pid}');
|
||||
|
||||
daemon.stdout
|
||||
.transform(UTF8.decoder)
|
||||
.transform(const LineSplitter())
|
||||
.listen((String line) => print('<== ${line}'));
|
||||
.listen((String line) => print('<== $line'));
|
||||
daemon.stderr.listen((data) => stderr.add(data));
|
||||
|
||||
stdout.write('> ');
|
||||
@@ -37,13 +38,13 @@ main() async {
|
||||
} else if (line == 'devices') {
|
||||
_send({'method': 'device.getDevices'});
|
||||
} else {
|
||||
print('command not understood: ${line}');
|
||||
print('command not understood: $line');
|
||||
}
|
||||
stdout.write('> ');
|
||||
});
|
||||
|
||||
daemon.exitCode.then((int code) {
|
||||
print('daemon exiting (${code})');
|
||||
print('daemon exiting ($code)');
|
||||
exit(code);
|
||||
});
|
||||
}
|
||||
@@ -54,5 +55,5 @@ void _send(Map map) {
|
||||
map['id'] = id++;
|
||||
String str = '[${JSON.encode(map)}]';
|
||||
daemon.stdin.writeln(str);
|
||||
print('==> ${str}');
|
||||
print('==> $str');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user