Skip to content

Commit 8ba214d

Browse files
committed
minor update to flutter daemon
1 parent dd8413c commit 8ba214d

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

packages/flutter_tools/lib/executable.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Future<Null> main(List<String> args) async {
5353
..addCommand(new ApkCommand())
5454
..addCommand(new BuildCommand())
5555
..addCommand(new CreateCommand())
56-
..addCommand(new DaemonCommand(hideCommand: !verboseHelp))
56+
..addCommand(new DaemonCommand(hidden: !verboseHelp))
5757
..addCommand(new DevicesCommand())
5858
..addCommand(new DoctorCommand())
5959
..addCommand(new DriveCommand())
@@ -62,11 +62,11 @@ Future<Null> main(List<String> args) async {
6262
..addCommand(new LogsCommand())
6363
..addCommand(new RefreshCommand())
6464
..addCommand(new RunCommand())
65-
..addCommand(new RunMojoCommand(hideCommand: !verboseHelp))
65+
..addCommand(new RunMojoCommand(hidden: !verboseHelp))
6666
..addCommand(new StopCommand())
6767
..addCommand(new TestCommand())
6868
..addCommand(new TraceCommand())
69-
..addCommand(new UpdatePackagesCommand(hideCommand: !verboseHelp))
69+
..addCommand(new UpdatePackagesCommand(hidden: !verboseHelp))
7070
..addCommand(new UpgradeCommand());
7171

7272
return Chain.capture(() async {

packages/flutter_tools/lib/src/commands/daemon.dart

+3-5
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,19 @@ const String protocolVersion = '0.1.0';
2626
/// It can be shutdown with a `daemon.shutdown` command (or by killing the
2727
/// process).
2828
class DaemonCommand extends FlutterCommand {
29-
DaemonCommand({ bool hideCommand: false }) : _hideCommand = hideCommand;
29+
DaemonCommand({ this.hidden: false });
3030

3131
@override
3232
final String name = 'daemon';
3333

3434
@override
3535
final String description = 'Run a persistent, JSON-RPC based server to communicate with devices.';
36-
final bool _hideCommand;
3736

3837
@override
3938
bool get requiresProjectRoot => false;
4039

4140
@override
42-
bool get hidden => _hideCommand;
41+
final bool hidden;
4342

4443
@override
4544
Future<int> runInProject() {
@@ -391,8 +390,7 @@ Map<String, dynamic> _deviceToMap(Device device) {
391390
return <String, dynamic>{
392391
'id': device.id,
393392
'name': device.name,
394-
'platform': _enumToString(device.platform),
395-
'available': true
393+
'platform': _enumToString(device.platform)
396394
};
397395
}
398396

packages/flutter_tools/lib/src/commands/run_mojo.dart

+4-5
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ class RunMojoCommand extends FlutterCommand {
2323

2424
@override
2525
final String description = 'Run a Flutter app in mojo (from github.com/domokit/mojo).';
26-
final bool _hideCommand;
2726

28-
RunMojoCommand({ bool hideCommand: false }) : _hideCommand = hideCommand {
27+
@override
28+
final bool hidden;
29+
30+
RunMojoCommand({ this.hidden: false }) {
2931
argParser.addFlag('android', negatable: false, help: 'Run on an Android device');
3032
argParser.addFlag('checked', negatable: false, help: 'Run Flutter in checked mode');
3133
argParser.addFlag('mojo-debug', negatable: false, help: 'Use Debug build of mojo');
@@ -43,9 +45,6 @@ class RunMojoCommand extends FlutterCommand {
4345
@override
4446
bool get requiresProjectRoot => false;
4547

46-
@override
47-
bool get hidden => _hideCommand;
48-
4948
// TODO(abarth): Why not use path.absolute?
5049
String _makePathAbsolute(String relativePath) {
5150
File file = new File(relativePath);

packages/flutter_tools/lib/src/commands/update_packages.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Future<int> _runPub(Directory directory, { bool upgrade: false }) async {
2424
}
2525

2626
class UpdatePackagesCommand extends FlutterCommand {
27-
UpdatePackagesCommand({ bool hideCommand: false }) : _hideCommand = hideCommand {
27+
UpdatePackagesCommand({ this.hidden: false }) {
2828
argParser.addFlag(
2929
'upgrade',
3030
help: 'Run "pub upgrade" rather than "pub get".',
@@ -39,8 +39,7 @@ class UpdatePackagesCommand extends FlutterCommand {
3939
final String description = 'Update the packages inside the Flutter repo.';
4040

4141
@override
42-
bool get hidden => _hideCommand;
43-
final bool _hideCommand;
42+
final bool hidden;
4443

4544
@override
4645
bool get requiresProjectRoot => false;

packages/flutter_tools/tool/daemon_client.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Process daemon;
1616
// devices: list devices
1717

1818
Future<Null> main() async {
19-
daemon = await Process.start('flutter', ['daemon']);
19+
daemon = await Process.start('dart', ['bin/flutter_tools.dart', 'daemon']);
2020
print('daemon process started, pid: ${daemon.pid}');
2121

2222
daemon.stdout

packages/playfair/lib/src/base.dart

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class Chart extends StatelessWidget {
4646

4747
final ChartData data;
4848

49+
@override
4950
Widget build(BuildContext context) {
5051
return new _ChartWrapper(textTheme: Theme.of(context).textTheme, data: data);
5152
}
@@ -57,8 +58,10 @@ class _ChartWrapper extends LeafRenderObjectWidget {
5758
final TextTheme textTheme;
5859
final ChartData data;
5960

61+
@override
6062
_RenderChart createRenderObject(BuildContext context) => new _RenderChart(textTheme: textTheme, data: data);
6163

64+
@override
6265
void updateRenderObject(BuildContext context, _RenderChart renderObject) {
6366
renderObject
6467
..textTheme = textTheme
@@ -93,6 +96,7 @@ class _RenderChart extends RenderConstrainedBox {
9396
markNeedsPaint();
9497
}
9598

99+
@override
96100
void paint(PaintingContext context, Offset offset) {
97101
assert(size.width != null);
98102
assert(size.height != null);

0 commit comments

Comments
 (0)