Commit dac1d4a1 authored by Devon Carew's avatar Devon Carew

Merge pull request #2706 from devoncarew/update_daemon

minor update to flutter daemon
parents dd8413c6 8ba214da
...@@ -53,7 +53,7 @@ Future<Null> main(List<String> args) async { ...@@ -53,7 +53,7 @@ Future<Null> main(List<String> args) async {
..addCommand(new ApkCommand()) ..addCommand(new ApkCommand())
..addCommand(new BuildCommand()) ..addCommand(new BuildCommand())
..addCommand(new CreateCommand()) ..addCommand(new CreateCommand())
..addCommand(new DaemonCommand(hideCommand: !verboseHelp)) ..addCommand(new DaemonCommand(hidden: !verboseHelp))
..addCommand(new DevicesCommand()) ..addCommand(new DevicesCommand())
..addCommand(new DoctorCommand()) ..addCommand(new DoctorCommand())
..addCommand(new DriveCommand()) ..addCommand(new DriveCommand())
...@@ -62,11 +62,11 @@ Future<Null> main(List<String> args) async { ...@@ -62,11 +62,11 @@ Future<Null> main(List<String> args) async {
..addCommand(new LogsCommand()) ..addCommand(new LogsCommand())
..addCommand(new RefreshCommand()) ..addCommand(new RefreshCommand())
..addCommand(new RunCommand()) ..addCommand(new RunCommand())
..addCommand(new RunMojoCommand(hideCommand: !verboseHelp)) ..addCommand(new RunMojoCommand(hidden: !verboseHelp))
..addCommand(new StopCommand()) ..addCommand(new StopCommand())
..addCommand(new TestCommand()) ..addCommand(new TestCommand())
..addCommand(new TraceCommand()) ..addCommand(new TraceCommand())
..addCommand(new UpdatePackagesCommand(hideCommand: !verboseHelp)) ..addCommand(new UpdatePackagesCommand(hidden: !verboseHelp))
..addCommand(new UpgradeCommand()); ..addCommand(new UpgradeCommand());
return Chain.capture(() async { return Chain.capture(() async {
......
...@@ -26,20 +26,19 @@ const String protocolVersion = '0.1.0'; ...@@ -26,20 +26,19 @@ const String protocolVersion = '0.1.0';
/// It can be shutdown with a `daemon.shutdown` command (or by killing the /// It can be shutdown with a `daemon.shutdown` command (or by killing the
/// process). /// process).
class DaemonCommand extends FlutterCommand { class DaemonCommand extends FlutterCommand {
DaemonCommand({ bool hideCommand: false }) : _hideCommand = hideCommand; DaemonCommand({ this.hidden: false });
@override @override
final String name = 'daemon'; final String name = 'daemon';
@override @override
final String description = 'Run a persistent, JSON-RPC based server to communicate with devices.'; final String description = 'Run a persistent, JSON-RPC based server to communicate with devices.';
final bool _hideCommand;
@override @override
bool get requiresProjectRoot => false; bool get requiresProjectRoot => false;
@override @override
bool get hidden => _hideCommand; final bool hidden;
@override @override
Future<int> runInProject() { Future<int> runInProject() {
...@@ -391,8 +390,7 @@ Map<String, dynamic> _deviceToMap(Device device) { ...@@ -391,8 +390,7 @@ Map<String, dynamic> _deviceToMap(Device device) {
return <String, dynamic>{ return <String, dynamic>{
'id': device.id, 'id': device.id,
'name': device.name, 'name': device.name,
'platform': _enumToString(device.platform), 'platform': _enumToString(device.platform)
'available': true
}; };
} }
......
...@@ -23,9 +23,11 @@ class RunMojoCommand extends FlutterCommand { ...@@ -23,9 +23,11 @@ class RunMojoCommand extends FlutterCommand {
@override @override
final String description = 'Run a Flutter app in mojo (from github.com/domokit/mojo).'; final String description = 'Run a Flutter app in mojo (from github.com/domokit/mojo).';
final bool _hideCommand;
RunMojoCommand({ bool hideCommand: false }) : _hideCommand = hideCommand { @override
final bool hidden;
RunMojoCommand({ this.hidden: false }) {
argParser.addFlag('android', negatable: false, help: 'Run on an Android device'); argParser.addFlag('android', negatable: false, help: 'Run on an Android device');
argParser.addFlag('checked', negatable: false, help: 'Run Flutter in checked mode'); argParser.addFlag('checked', negatable: false, help: 'Run Flutter in checked mode');
argParser.addFlag('mojo-debug', negatable: false, help: 'Use Debug build of mojo'); argParser.addFlag('mojo-debug', negatable: false, help: 'Use Debug build of mojo');
...@@ -43,9 +45,6 @@ class RunMojoCommand extends FlutterCommand { ...@@ -43,9 +45,6 @@ class RunMojoCommand extends FlutterCommand {
@override @override
bool get requiresProjectRoot => false; bool get requiresProjectRoot => false;
@override
bool get hidden => _hideCommand;
// TODO(abarth): Why not use path.absolute? // TODO(abarth): Why not use path.absolute?
String _makePathAbsolute(String relativePath) { String _makePathAbsolute(String relativePath) {
File file = new File(relativePath); File file = new File(relativePath);
......
...@@ -24,7 +24,7 @@ Future<int> _runPub(Directory directory, { bool upgrade: false }) async { ...@@ -24,7 +24,7 @@ Future<int> _runPub(Directory directory, { bool upgrade: false }) async {
} }
class UpdatePackagesCommand extends FlutterCommand { class UpdatePackagesCommand extends FlutterCommand {
UpdatePackagesCommand({ bool hideCommand: false }) : _hideCommand = hideCommand { UpdatePackagesCommand({ this.hidden: false }) {
argParser.addFlag( argParser.addFlag(
'upgrade', 'upgrade',
help: 'Run "pub upgrade" rather than "pub get".', help: 'Run "pub upgrade" rather than "pub get".',
...@@ -39,8 +39,7 @@ class UpdatePackagesCommand extends FlutterCommand { ...@@ -39,8 +39,7 @@ class UpdatePackagesCommand extends FlutterCommand {
final String description = 'Update the packages inside the Flutter repo.'; final String description = 'Update the packages inside the Flutter repo.';
@override @override
bool get hidden => _hideCommand; final bool hidden;
final bool _hideCommand;
@override @override
bool get requiresProjectRoot => false; bool get requiresProjectRoot => false;
......
...@@ -16,7 +16,7 @@ Process daemon; ...@@ -16,7 +16,7 @@ Process daemon;
// devices: list devices // devices: list devices
Future<Null> main() async { Future<Null> main() async {
daemon = await Process.start('flutter', ['daemon']); daemon = await Process.start('dart', ['bin/flutter_tools.dart', 'daemon']);
print('daemon process started, pid: ${daemon.pid}'); print('daemon process started, pid: ${daemon.pid}');
daemon.stdout daemon.stdout
......
...@@ -46,6 +46,7 @@ class Chart extends StatelessWidget { ...@@ -46,6 +46,7 @@ class Chart extends StatelessWidget {
final ChartData data; final ChartData data;
@override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return new _ChartWrapper(textTheme: Theme.of(context).textTheme, data: data); return new _ChartWrapper(textTheme: Theme.of(context).textTheme, data: data);
} }
...@@ -57,8 +58,10 @@ class _ChartWrapper extends LeafRenderObjectWidget { ...@@ -57,8 +58,10 @@ class _ChartWrapper extends LeafRenderObjectWidget {
final TextTheme textTheme; final TextTheme textTheme;
final ChartData data; final ChartData data;
@override
_RenderChart createRenderObject(BuildContext context) => new _RenderChart(textTheme: textTheme, data: data); _RenderChart createRenderObject(BuildContext context) => new _RenderChart(textTheme: textTheme, data: data);
@override
void updateRenderObject(BuildContext context, _RenderChart renderObject) { void updateRenderObject(BuildContext context, _RenderChart renderObject) {
renderObject renderObject
..textTheme = textTheme ..textTheme = textTheme
...@@ -93,6 +96,7 @@ class _RenderChart extends RenderConstrainedBox { ...@@ -93,6 +96,7 @@ class _RenderChart extends RenderConstrainedBox {
markNeedsPaint(); markNeedsPaint();
} }
@override
void paint(PaintingContext context, Offset offset) { void paint(PaintingContext context, Offset offset) {
assert(size.width != null); assert(size.width != null);
assert(size.height != null); assert(size.height != null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment